Announcement

Collapse
No announcement yet.

Best way to make state required for only some countries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!
    Susan Petracco
    NetBlazon

    1.866.400.2444

    _____________________________________________

    Like us on Facebook

    #2
    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.)
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Thank you Bruce :)
      Susan Petracco
      NetBlazon

      1.866.400.2444

      _____________________________________________

      Like us on Facebook

      Comment


        #4
        Originally posted by netblazon View Post
        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!
        Hey Susan,

        Did you ever get a simple solution for this? Seems it is still an issue almost 3 years later.
        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment


          #5
          My "Modulator" utility can handle this, with the help of some template coding.
          Kent Multer
          Magic Metal Productions
          http://TheMagicM.com
          * Web developer/designer
          * E-commerce and Miva
          * Author, The Official Miva Web Scripting Book -- available on-line:
          http://www.amazon.com/exec/obidos/IS...icmetalproducA

          Comment


            #6
            Javascript ;)
            Susan Petracco
            NetBlazon

            1.866.400.2444

            _____________________________________________

            Like us on Facebook

            Comment

            Working...
            X