I have an HTML form with a text input field. As the user types, we do AJAX requests to get predictive text suggestions, based on a list of values in our database.
We display that list and the user can select one of them; then we show them the rest of the form.
If you're viewing our web page on a Samsung Galaxy S4, in its built-in browser or Chrome or Firefox, the device's predictive input suggestions also appear as the user types. e.g. see the screenshot:
It's easy enough for an individual user to disable this in the settings on their own phone. However we want to make it so it's always disabled for this field for all users. We're already doing all the following, which don't seem to prevent it appearing:
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
You can also see this here.
Any suggestions?
Use the <input> tag with autocomplete attribute. Set the autocomplete attribute to value “off”.
Go to the keyboard app's settings. Scroll down and look for “Text Correction” or something similar. Tap on “Predictive Text” or “Next-Word Suggestions” to toggle the feature off. Test the keyboard and see if the option is disabled.
I've tried different things and it seems that on mobile you currently have no chance to do this in a proper way.
According to Safari Developer Docs there is support https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html but it seems that this is more related to the Desktop Safari than iOS.
Additionally, spellcheck could do it but currently, according to http://caniuse.com/#feat=spellcheck-attribute :
The partial support in mobile browsers results from their OS generally having built-in spell checking instead of using the wavy underline to indicate misspelled words. spellcheck="false" does not seem to have any effect in these browsers.
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