Conditional Field Visibility

dvilimek

New Member
Hi,

Hoping you can help -- I think this is an easy one for someone in the know.
I have a form: http://www.vilimek.ca/geotag/form/testform.html Once the country is selected, a javascript (testjs.js) dictates which regions to show depending on country.

1. I'd like to take that one step further and only have the region dropdown visible to the user if a country for which I have written in regions is selected. Eg. visible if Canada, United States, France, etc selected; hide if Mongolia, Zimbabwe, etc selected.

2. If I select United States, than Alabama is the region default selected. However, if I switch to another country that has no regions listed (without refreshing my browser), Alabama still remains the default. I need that to go back to the starting default message of "Choose Province/State" and to hide.

Any thoughts?

Thanks,
Dino
 

dvilimek

New Member
Hi everyone,

I've implemented a change I found online. The new form can be found at: http://www.vilimek.ca/geotag/form/testform2.html and javascript at http://www.vilimek.ca/geotag/form/testjs2.js

One strange thing is that the region element, when visible, is now appearing below the country label and not beside it. Any way to adjust that? If I integrate this code as is in a form with other fields, the appearance of the regional field pushes the entire form down one row. It would be cleaner if it appeared to the side. Is that complex?

Many thanks, and do appreciate all the help these forums have provided over the years.
Dino
 
Top