show/hide dropdown if value selected in other dropdown

versionvirtual

New Member
Let's say I have two databasejoin elements: "Country" and "State". If user selects in "Country" a certain value (For example "Mexico") I want "State" databasejoin dropdown appear in the form. But if "Country" is anything else, I want to hidde "State".

I mean, "State" dropdown should only appear if "Country" is "Mexico". I guess something like (user_country == "Mexico")

I've read about validation, isempty, isnot, etc... I also tried with "cascadingdropdown" plugin, but can't figure out how to hidde the dropdown if value is not Mexico.

Thanks for your help!
 
Check out the Javascript actions on the element settings. They allow you to do exactly that.

You'd usually want 3 actions ... one running on load to hide it, and two 'change' events to hide and show.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top