Reputation: 71
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.
Upvotes: 1
Views: 985
Reputation: 79
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.
Upvotes: 1