Answer the question
In order to leave comments, you need to log in
Magento 2 - checkout and required fields, how to change?
Hello. I installed the Magento 2 version, I like everything, except for the order form.
In the battle for the conversion rate in the CIS countries, everyone is trying to make ordering as simple as possible. At the moment, there are a lot of mandatory fields in the form, such as city, region, etc.
I need to make the following required fields:
- Phone
And these fields should be visible, but not required :
- First and last name
- City
- e-mail
What I did:
I tried to edit the file ../vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml
There you can specify hidden fields by specifying the attribute
<item name="visible" xsi:type="boolean">false</item>
. <item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="string">false</item>
</item>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question