Problem:
A Toolset Form contains two select fields where the choices in the second field are dependent on what is selected in the first field. Is there any way to connect the two so that the second select field updates according to what is chosen in the first?
Solution:
This requires a custom solution, which would involve building an array mapping the relationship between the options in the two fields in PHP, and then passing that array to the front-end using wp_localize_script, and then using a bespoke JavaScript solution to connect the two select fields accordingly.
This is explained in a little more detail below:
https://toolset.com/forums/topic/a-solution-to-sync-select-boxes-in-cred-form-without-using-multi-step-forms/#post-915230
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 1 reply, has 2 voices.
Last updated by 6 years, 5 months ago.
Assisted by: Nigel.