This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user wanted to create dependent parent fields in Toolset Forms.
Solution:
Unfortunately it is not possible to create dependent fields in our Toolset Forms plugin. Parent selection fields are not programmed to be dependent on another parent field selection
This support ticket is created 4 years, 9 months 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.
The problem starts with the field themselves not being dependent on each other.
However I just thought of a solution but it would require some amount of work. This would utilize conditional fields to hide the fields that are not relevant to the choice the user selects.
So if the user selects USA, only the fields that have all the states of the USA will show up. Likewise with the State field only the city of that state will show up.
This would mean tho that you would need to create each individual field and populate it with the correct data so whenever the user makes a choice the correct field will show up based on the Types field conditional that was set.
Regarding the custom code, I thought about an approach and it would pretty much require that you have some relationship mechanism with the fields in order to have the dependencies.
So I believe the best approach would be to manually build out the fields and their conditionals, tho this will take some time to achieve.
Thanks A LOT Shane, for looking into this further, it's greatly appreciated.
So this would mean: I would create custome select fields with all the state options for every option in the
- country select field
And then create custom select fields for all the city options for every state option.
Then in the contact form I would set up the country select field
and then conditionally show the state select field based on the choice that was made in the country select field
and then conditionally show the city select fiel based on the choice that was made in the state select field?
That is correct, so if you select USA then only the custom field that contains the states for USA will display and then the user can select their state and then only the cities on that state custom field will display.
Thanks Shane, I will try and think of a solution, maybe I will reduce it only to 2 levels so I don't have to create too many conditionals... It's a pity though this feature is not included in Toolset, since it would make the filter dependency feature a lot more useful. Thanks. Tobias