Knowledge Base When the checkout loads the first state is...

When the checkout loads the first state is selected by default. How can I force a customer to select a state.

Author Bill Brewer
Created
To display an option that says "Select...", and require the customer to change this to a valid state before submitting the form use the the following SQL statement. This can be entered in your X-Cart admin -> Patch/Upgrade -> SQL Query(ies) section:

INSERT INTO xcart_states (stateid,state,code,country_code) VALUES ('', 'Select...', '', 'US');
This query will need to be executed for each country you ship to.Change 'US' to enter a different country.For example, UK:

INSERT INTO xcart_states (stateid,state,code,country_code) VALUES ('', 'Select...', '', 'UK');

Was this article helpful?

Yes
No