cancel
Showing results for 
Search instead for 
Did you mean: 

autocomplete off on billing and shipping checkout form

autocomplete off on billing and shipping checkout form

Hi 

 

I want to autocomplete off on billing and shipping checkout form

 

Please help

3 REPLIES 3

Re: autocomplete off on billing and shipping checkout form

@johdanlusefa34 

 

please follow the link

 

http://www.ancamihaela.info/2017/07/14/magento-2-how-to-remove-the-autocomplete-on-forms-on-checkout...

 

Find helpful ?Consider Giving Kudos to this post.
Problem solved? ClickAccept as Solution!

Re: autocomplete off on billing and shipping checkout form

Hello @johdanlusefa34 

 

For disabling autcomplete feature for all inputs than you can go with solution given by @piyush_khandelw 

 

and for individual off you can simply use JS code to your custom JS or any JS used in checkout :

$("#field_id").attr("autocomplete", "off");

Please check with all compatible browsers as it doesn't work with some previous version browsers.


Hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: autocomplete off on billing and shipping checkout form

Hello @johdanlusefa34 

If you want to remove the autocomplete on any form on checkout then you need to overwrite the file that contains the form html and add the autocomplete=”off” attribute.

For example for the shipping address form you need to overwrite this file:

vendor/magento/module-checkout/view/frontend/web/template/shipping-address/form.html

And add the autocomplete=”off” attribute like this:

<form autocomplete=”off” class="form form-shipping-address" id="co-shipping-form" data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">

Now the autocomplete functionality is disabled for all of the fields of the “co-shipping-form”.

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!