Autocomplete attribute using ReactJS

I am trying to use the autoComplete attribute for credit card data (not wrapped in any form), but it does not work.

Any guesses? Is https required for autocomplete to work?

I tried using Safari and Chrome:

<input type='text' placeholder='xxxx xxxx xxxx xxxx' value={this.state.card} autoComplete='on' />

<input type='text' placeholder='xxxx xxxx xxxx xxxx' value={this.state.card} autoComplete='cc-number' />

+4
source share
3 answers

Try using it as follows:

<input autoComplete={'off'}>
+1
source

Thanks for the answer. This did not work for me. I just realized: using nameboth iddetails with cc_numberand, of course, not starting the project on localhost, works.

<input type='text' name='cc_number' id='cc_number' ... />

exp_month exp_year.

0

, <form>. .

0

Source: https://habr.com/ru/post/1608381/


All Articles