Skip Navigation

[Resolved] Create a select field with custom elements

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Shane 4 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1765147

Tell us what you are trying to do?
Hi,

I have created a form to created new items. It has a select filed called item type. For now the item type select field has a number of fixed types. However, I want to make this select field to be dynamic an the user can enter the field types as they want before using it in the item form. Is this possible in toolset and if yes how it can be done?

#1765413

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nabils,

Thank you for getting in touch.

Unfortunately no you are not able to do this. Only Taxonomies can get values added to the options dynamically on the frontend.

If you want to achieve this you will need to use a taxonomy instead of a select field.

Thanks,
Shane

#1767181

Thank you for your reply.
Do I have to add custom fields or terms for taxonomy? Also I want to know, can taxonomy be added in the frontend?

#1768387

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nabils,

Do I have to add custom fields or terms for taxonomy?

For the custom select fields, yes you will need to add a predefined list of items that you would want the user to select on the frontend. For the taxonomy you don't need to as the Frontend form field for the taxonomy has an Add New button that will allow users to add terms they want if its not available.

Also I want to know, can taxonomy be added in the frontend?

Yes terms can be added from the frontend when the user is creating a new post.

Please let me know if this helps.
Thanks,
Shane

#1770003

I still cannot display the add categories in the front end.

What I did is:
1-Create a taxonomy for my post type "enginvitemtaxo".
2- Create Term Field "enginvitemtaxocategory" which is a select field.
3-Add post field items taxonomy to the post form for creating new item.
[cred_field field='enginvitemtaxo_add_new' taxonomy='enginvitemtaxo' type='add_new']
I cannot find the term field "enginvitemtaxocategory" to add in the form.
After that I cannot see the term field in the form. What can be the problem?

#1771217

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nabils,

Would you mind allowing me to have admin access to the site so that I can have a look at what is happening here ?

The private fields will be enabled for your next response.

Also please let me know the page that your form is on.

Thanks,
Shane

#1776067

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nabils

3-Add post field items taxonomy to the post form for creating new item.
[cred_field field='enginvitemtaxo_add_new' taxonomy='enginvitemtaxo' type='add_new']
I cannot find the term field "enginvitemtaxocategory" to add in the form.
After that I cannot see the term field in the form. What can be the problem?

You can ONLY create the taxonomy on the frontend form, you cannot populate its custom fields through the frontend form. You can only do this on the backend.

Let me know if this was a bit clearer for you.

Thanks,
Shane

#1776761

Thank you for the clarification. Can I use different way than taxonomy to get this done all in the front end?

#1777391

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nabils,

Here is a clear list of what you can and cannot do from the frontend.

Can do:
1. Create new posts from the frontend.
2. Create new taxonomies from the frontend when you are creating a new post.

Can't do:
1. Populate taxonomy term fields on the frontend.
2. Add new custom field options from the frontend.

So if you want to give the users the freedom to add a brand new option, you will need to use the taxonomy but you won't be able to populate the taxonomy custom fields. If you don't want to give the users the option to add a new option on the frontend you can use the custom select fields.

Please let me know if this clarifies what can be done for you.

Thanks,
Shane