While working on a Drupal Commerce project, I came across an interesting issue during checkout. My client’s coupon field keeps getting populated with a user’s country when they use autofill to fill out their address.
Upon working through disabling the autofill or autocomplete feature on the coupon field, the new version of Google’s browser Google Chrome ignores the autocomplete=off setting.
The solution to this problem was to update the autocomplete attribute with a string other than ‘off.’
Correct way, but ignored by Google:
<input type="text" name="commerce_coupon" autocomplete="off">
Updated way to work with the latest Google Chrome:
<input type="text" name="commerce_coupon" autocomplete="new-string">
Original Post: https://www.linkedin.com/pulse/google-chrome-ignoring-autocomplete-mike-michalak/
Comments