[Resuelto] Test radio buttons/checkbox in wpv-conditional. Documentation not clear
This support ticket is created hace 3 años, 11 meses. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tell us what you are trying to do?
I have 3 radio buttons: Red, Green, Blue and are assigned values 1, 2, 3, respectively. If I want to test them in wpv-conditional, is it like this:
if="( $(wpcf-xxxx) eq 2 )"
Or is it like this:
if="( $wpcf-xxxx) eq '2' )"
Is there any documentation that you are following?
Documentation is contrdictory. In one place it says constants should be quoted, but in another place it says numbers should not be quoted. So, not 100% clear.
And in the Custom Fields page for a custom post, when setting a field conditional display manually (Advanced) it appears checking for radio buttons and checkboxes you should not use quotes for numbers like these. Confusing.
And in the Custom Fields page for a custom post, when setting a field conditional display manually (Advanced) it appears checking for radio buttons and checkboxes you should not use quotes for numbers like these. Confusing.
===>
If you are referring to the post field conditional display where you can add "Conditional display" for your custom field by adding a condition.
Please note that there are few types of post fields you cannot use as conditions for showing other fields. These fields include the Embedded Media, File Fields (Audio, Video, Image and File Upload field), Multiple Checkboxes field and a WYSIWYG Text Area field.
So, you can set the condition based on your radio field but not based on your checkboxes field as its not supported.