Announcement
Collapse
No announcement yet.
Best way to make state required for only some countries
Collapse
X
-
My "Modulator" utility can handle this, with the help of some template coding.
Leave a comment:
-
Originally posted by netblazon View PostWhat's currently the best way to make the state (or other state/province) field required for US and a few other countries, but optional for the rest?
I'm thinking make the field optional in MIVA, and use Javascript to make it required based on the country selected.
I'm open to better ideas though. Thanks!
Did you ever get a simple solution for this? Seems it is still an issue almost 3 years later.
Leave a comment:
-
Yea, can't imagine doing anything other than JS/jQuery on this as you'll want to make the form respond to user input rather than on submit. One thing we do when needing this type of control is either put the "SELECT COUNTRY" on the ORDL screen or as the first item (sometimes hiding all other inputs) on the OCST screen. Then, when the user selects 'US', US only fields appear, or if they select UK, then UK fields appear. (The beauty here, is that some jQuery form validation scripts will modify things like Phone inputs to match the country.)
Leave a comment:
-
Best way to make state required for only some countries
What's currently the best way to make the state (or other state/province) field required for US and a few other countries, but optional for the rest?
I'm thinking make the field optional in MIVA, and use Javascript to make it required based on the country selected.
I'm open to better ideas though. Thanks!Tags: None
Leave a comment: