1

I am using a React redux-form input and this is my code:

return (
        <Field
          key={name}
          component={SurveyField}
          type="text"
          label={label}
          name={name}
          autocomplete="off"
        />
      );

I don't want chrome to autoComplete the form. I have tried both but none working.

autocomplete="off"
autoComplete="off"

I suppose Chrome just ignores the autoComplete. I have seen the other StackOverflow questions but they are not helpful.

  • 1
    Possible duplicate of [how to avoid or disable autoComplete in text input for Redux form?](https://stackoverflow.com/questions/41056858/how-to-avoid-or-disable-autocomplete-in-text-input-for-redux-form) – AKX Sep 27 '19 at 12:04
  • 3
    (tl;dr: `autoComplete`, not `autocomplete`). – AKX Sep 27 '19 at 12:04
  • Possible duplicate of [Disable chrome auto complete feature in React JS](https://stackoverflow.com/questions/50347574/disable-chrome-auto-complete-feature-in-react-js) – Elias Soares Sep 27 '19 at 12:05
  • 2
    You all give links with possible duplicates, but there are no working solutions with redux form – Konstantin Kim Oct 02 '19 at 16:48

1 Answers1

1

I find that adding the autocomplete property to the <input autoComplete="off"/> tag defined in your component callback function rather than depending on the redux-form <Field /> tag to pass this property to DOM will properly set this property in the html generated and autocomplete="off" will work as expected.