3

Our client wants us to make the state field as an optional one in the Checkout. In order to do this, we have removed all the countries from the required state option and set to "Yes" for allowing to choose the state and make it an optional one through State option in Magento admin panel.

Now, we can see that the state field showing in the checkout but not as a mandatory field as per our client requirement. Here, we have a doubt, our client using an API to fetch the school address into the checkout. There, we can see that in some of the schools, the state field is showing as not mandatory but also there are schools which are omitting the state field.

how the state options work in Magento 2?

Could anyone please help me with this?

1 Answer 1

1

Answer for your Question "how the state options work in Magento 2"

In many countries, the state, province, or region is a required part of a postal address. The information is used for shipping and billing information, to calculate tax rates, and so on. For countries where the state is not required, the field can be omitted entirely from the address, or included as an optional field.

Reference Magento User Guide

https://docs.magento.com/m2/2.1/ce/user_guide/stores/state-options.html

enter image description here

Allow to Choose State if It is Optional for Country

For countries where it is not required, determines if the Region/State field is included in the postal address of the customer. Options:

If Yes Includes the Region/State field in the customer address, even if not required by the country.

If No Omits the Region/State field from the customer address if not required by the country.

I hope this will help

3
  • Thanks. Can you please tell me "For countries where the state is not required, the field can be omitted entirely from the address, or included as an optional field" is not in control of Magento itself?
    – Siva
    Commented Jan 29, 2019 at 8:22
  • @Magentovsmarttec Answer edited I added more details. If you still have confusion then tell me Commented Jan 29, 2019 at 9:49
  • @Magentovsmarttec have your confusion is cleared now? Commented Jan 29, 2019 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.