In my requirement, the field group in post form should be visible based on the value selected in the taxonomy field.
https://toolset.com/forums/topic/post-form-conditional-group-for-taxonomy/
Referred to the above link and provided the code like below:
[cred_show_group if="($(occupants) eq 'Yes')" mode="fade-slide"]
Field group to show
[/cred_show_group]
Note: occupants - Taxonomy field slug, Yes - Taxonomy field value.
However, the code above does not seem to be working. Please suggest.
Thanks.
Hi,
Thank you for contacting us and I'd be happy to assist.
The taxonomy term value that is used in the condition, depends on the type of the field that is being used.
For example, in case the taxonomy field is set to use the "checkbox" type, you'll use the title/name of the term
[cred_show_group if="( $(occupants) eq 'Yes' )" mode="fade-slide"]
Field group to show
[/cred_show_group]
But, if the taxonomy field is set to the "select" type field, then you'll use the term's ID:
[cred_show_group if="( $(occupants) eq '10' )" mode="fade-slide"]
Field group to show
[/cred_show_group]
( based on the screenshot, '10' is the ID of the term "Yes" )
regards,
Waqar
Many thanks Waqar,
It is working, please look at the new image uploaded and let me know whether that is the place where you have identified term ID.
Thanks,
Pramod.
Thanks for the update and glad that it is working.
Your understanding is correct and your new screenshot correctly points out the term ID, in the URL parameter.
My issue is resolved now. Thanks Waqar!