In Magento 2, I want to change input telephone type to number only in all forms.

I succeed this change in checkout page by following this post :


But I don't know how to make the same on customer account create and edit forms.

Do you have any ideas ?



You can use template path hints to find which .phtml file render elements. This link should help You to turn this on.
Using this method i found that telephone input on accout edit page is in
\vendor\magento\module-customer\view\frontend\templates\widget\telephone.phtml. So You have to override this file in your custom theme or in Your custom module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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