Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I make the "State" field non-required?


WoodsWalker

Recommended Posts

Greetings!

 

I'm doing some tinkering. Can't find a direct answer to this, although I Googled it.

 

Our customers in countries that don't have states, e.g., Denmark, are baffled by the requirement that they put something in the "State" field when inputting their address.

 

I can't disable it Admin>Configuration>Customer Details, as most of our customers' addresses do have states/provinces, such as those in Canada and the USA.

 

I tried setting the field's minimum length 0 in Minimum Values, but customer is still required to enter something in the field.

 

I want to leave the field intact, but simply make it "non-required". Is this possible?

 

Thanks for your help!

 

~Wendy

Link to comment
Share on other sites

  • 2 weeks later...

OK, I finally had a chance to look at this again. I followed Bryce's link to a previous thread about this, and checked out what it suggested.

 

I had no problem removing the "*" asterisk that denotes a "required" address field.

 

Then the the harder part - making the "State" actually non-required.

 

I checked the address_book table in the database, and found that for "State", a NULL value was already allowed, just as it is for "Company". Still, European customers had reported being forced to enter something under "State". And I had done some tests and found that they were right. Hmmm.

 

The only suggestion left was to enter nothing at all (rather than "0") in the admin's "Minimums" section, for the length of the "state" field. I did this (at the same time noting that "Compnay" has a zero, although customers aren't forced to enter a company name - so what gives?)

 

I did this and re-tested. Now, the "State" field does not seem to be required, and I am not getting any errors in Firefox. I'd better try it on some other browsers. Stay tuned.

 

~Wendy

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...