Provide ability to set autocomplete attribute on a per-field basis

I have run into this a number of times. A given browser’s autofill doesn’t know how to treat a form field so it autofills the wrong information. Having the ability to set the autocomplete attribute as described by WHATWG at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill would be helpful. An even more generic approach would be allowing the user to append any attribute to the field tag via a simple text field under the Advanced settings tab of a given field.

2 Likes

That’s a good suggestion, to have it available in the form builder. Sounds like a good idea for an add-on!

It’s possible now, but only with code. This does it for the whole form:

The gform_field_content filter can be used for individual fields. This example shows turning it on for an email field, but you could use a similar approach to turn it off, based on the field ID or field type:

@adamsts Not sure if this Add-on might be useful?

Hi Chris, has anything happened on this. I have an issue at the moment where a field is called Street Food and the Street is being added using the browsers autocomplete. It’s fine in Roboform autocomplete, however most people are using the browser option.

There hasn’t been any activity on the request but I’ll put another vote in for you.

It appears that when Gravity Forms is set to output HTML5 fields, Google Chrome autocompletes both Address Line 1 and Address Line 2 with the same information if the autocomplete entry only has one line. I believe that setting the autocomplete attribute on a per-field basis as suggested here would solve this.

It’s a good suggestion. I recommend submitting this as a new idea on our product roadmap:

https://www.gravityforms.com/gravity-forms-roadmap/