3

How to enable autocomplete for the checkout form? Currently my browser (chrome) does not store any input values...

5
  • Which fields are you talking about? Which browser? There is a CSS or form field attribute (don't remember properly) which you can use to influence autocomplete.
    – Alex
    Jun 5, 2013 at 13:17
  • But this is more or less a browser-question. Maybe magento's field names are to strange for some browsers (because of the PHP arrays ... i.e. billing[firstname])
    – Alex
    Jun 5, 2013 at 13:19
  • & did you try if it works on other shops? Your address etc. might just not be cached in your developer's machine?
    – Alex
    Jun 5, 2013 at 13:20
  • Happends with chrome on demo.magentocommerce.com It can't be CSS and I don't see any autocomplete attribute, could be caused by JavaScript. Jun 5, 2013 at 13:22
  • Confirmed. I had chrome://settings/autofill empty first, but after fixing this it still does not work. On other shops it does work.
    – Alex
    Jun 5, 2013 at 13:27

3 Answers 3

2

We did the following on Magento 1.8.1

  1. changed as described by Inchoo in billing.phtml. Don;t forget to change both in template/checkout/ and template/persistent

    form id="co-billing-form" method="post" autocomplete="on" action=""

  2. Updated opcheckout.js

    elements[i].setAttribute('autocomplete','on');

This works fine now.

One thing we do see however. If you have some nice CSS set-up that add the checkmarks or other to validated fields is that the autocomplete overwrites this with the infamous yellow background

5

Our friends over at Inchoo have a nice article on this along with a fix. Basically, you just need to add a method to the form, either post or get.

In template/persistent/checkout/onepage/billing.phtml add method="post" in line 28:

<form id="co-billing-form" method="post" action="">
<fieldset>
    <ul class="form-list">
3

Magento disables the automatic filling of some forms.

Screenshot of demo.magentocommerce.com, checkout

This is done by calls like elements[i].setAttribute('autocomplete','off'); in opcheckout.js.

But even uncommenting this call did not make it work.

If you search the code for a RegEx autocomplete.*off there are many places where autocomplete is disabled.

There are browser plugins to override this - but I guess you want to make the shopping experience better for all customers, without the need to install a plugin ;-)

So there would be some debugging needed - please share your results!

Your Answer

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

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