codeforamerica / honeycrisp-gem

A Rails gem with base styles and Javascript for Code for America products
http://honeycrisp.herokuapp.com
MIT License
24 stars 8 forks source link

Set default attributes on relevant inputs #264

Closed hartsick closed 3 years ago

hartsick commented 3 years ago

Prevent autocompletion by browser, autocorrect, autocapitalization, and spellcheck. Belief is that they are not desirable for our main use cases (eg shared computers or data entry for multiple people, phones & names & addresses).

Can be overriden by passing HTML options to form field.

This matches behavior for our previous form builder.

MDN docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#attr-autocorrect (non-standard)

And: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

Closes #263

hartsick commented 3 years ago

@bensheldon great! thanks, ben!