Hello,
I have created a Cred including a taxonomy. I'm displaying it as a select field.
The issue I have is that even if the field is not mandatory, the first option is always validated (pre populated).
For some cases, I don't need to have any option chosen, but that seems impossible !
I have made some research and found this : https://toolset.com/forums/topic/populate-a-preset-vale-for-category-taxonomy-for-front-end-submission-form/#post-1234008
but I need to place the select ID and cannot find it in the html code delivered by the Cred (in fact, I can find some but it's changing at each page reload, so not usable for this !).
Could you give me the way to have this ?
Regards
Pat
That's right when displaying Custom Taxonomies with the Forms in a select format, the first and selected option is the first term in the taxonomy.
But that's just the native behaviour of Taxonomies in general, WordPress' "Categories" also will always be set to "Uncategorized" if nothing else is chosen, and that is, in fact, a Term.
The easiest solution would be to create such "nulled" term in your taxonomy.
Then it could be used the same way as the WordPress native Categories where you also cannot unselect the always selected "Uncategorized" term (even in the backend).
I am however also aware, that in the backend, Custom Taxonomies leave you that freedom to not select any term for.
That's not possible in Forms, I think it needs a new Feature.
Currently, you could do this with Custom Code only:
https://toolset.com/forums/topic/drop-down-list-of-taxonomies-first-choice/#post-611270
https://toolset.com/forums/topic/default-value-select-taxonomy-term-in-cred/
New Features can be usually submitted at https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/, but I'll first check with my colleagues what they think about asking the Developers adding this as an attribute to the shortcode in Forms anyway.
I'll update you here as soon as I have news.
My issue is resolved now. Thank you!