Skip Navigation

[Resolved] How to display certain radio field options based on previous radio box selection

This support ticket is created 3 years 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)

This topic contains 2 replies, has 2 voices.

Last updated by morenoT 3 years ago.

Assisted by: Shane.

Author
Posts
#2340639

I have a user form that has two radio custom field.

How can I set it up so that the option selected from radio #1 affects what displays in radio #2?

Example:
Radio #1 options:
- Green
- Red
- Yellow

Radio #2 options:
- Grapes (only shows up if "Green" is selected)
- Watermelon (only shows up if "Green" is selected)
- Apples (only shows up if "Red" is selected)
- Cherries (only shows up if "Red" is selected)
- Bananas (only shows up if "Yellow" is selected)
- Lemons (only shows up if "Yellow" is selected)

Thank you!

Moreno

#2340673

Shane
Supporter

Languages: English (English )

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

Hi Moreno,

Unfortunately you won't be able to perform a conditional on the individual checkbox options on your form.

What you can do however is to create multiple dependent radio button fields that are dependent on the options from Field 1.

So in our Types plugin you can setup dependent fields so some fields will only display based on the value of another field.

In your case above you will create 3 other custom fields that are dependent on Field 1 so whenever you select an option in Field 1 only the field that meets that conditional requirement will be displayed.

Have a look at our documentation below for further details.
https://toolset.com/course-lesson/conditionally-display-custom-fields-in-wordpress-backend/

Please let me know if this helps.
Thanks,
Shane

#2341155

My issue is resolved now. Thank you!