We are working on one web application in that one payment page is there.
In that we have two Text box one is for Credit Card Number and second one is for Verification Code and it type="Password".
Now problem is when page is load in google-chrome it found type="Password" it load Save email id in Credit Card Textbox and password in Verification Code.
Now try to solve this issue i was try out something like below.
<form autocomplete="off">
<asp:textbox autocomplete="off">
This above try is not work for me. i was googling it but by luck it's not work for me.
To disable autocomplete on the whole form: <form autocomplete="off" ...> Or if you dynamically need to do it: <form autocomplete="random-string" ...>
Enable Autocomplete Step 1: Open Chrome on your PC and click on the three-dot icon at the top-right corner. Select Settings from the menu. Step 2: Click on Sync and Google services under People. Step 3: Turn the toggle on present next to Autocomplete searches and URLs.
This is because with HTML, this attribute (like any other), is a suggestion to the browser. To make things a little more complicated, browsers may also autofill form fields based on the field's name or id attributes. This is how browsers did it before the autocomplete attribute came along.
Use the <input> tag with autocomplete attribute. Set the autocomplete attribute to value “off”.
It appears that Chrome now ignores autocomplete="off" unless it is on the <form autocomplete="off">
tag since v34.
you can't cheat by create an hidden input over. Auto complete feature will get the first input text to fill data.
Method 1:
<form id="" method="post" action="" autocomplete="off">
<input type="text" style="display:none" />
<input type="password" style="display:none">
<asp:textbox autocomplete="off">
</form>
So put this before your textbox.
<input type="text" style="display:none" />
Method 2:
Change
autocomplete="off"
to
autocomplete="false"
Method 3: Browser autofill in by readonly-mode.
<input type="password" readonly onfocus="this.removeAttribute('readonly');"/>
Method 4:
For username password combinations. Chrome heuristics looks for the pattern.
<input type="text" onfocus="this.type='password'">
Method 5: jQuery
if ($.browser.webkit) {
$('input[name="password"]').attr('autocomplete', 'off');
$('input[name="email"]').attr('autocomplete', 'off');
}
This is the only solution that worked for me with both Autocomplete and Chrome's Autofill:
It works also after calling new this.props.google.maps.places.Autocomplete
Add autocomplete="off" on the form tag.
Set autocomplete="none" directly on the input inside the form and set the attribute again on focus.
<form autocomplete="off">
<input type="text" autocomplete="none" onfocus="this.setAttribute('autocomplete', 'none');"/>
</form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With