user1820679
user1820679

Reputation:

how do I activate/deactivate predictive text for input fields on mobile devices?

i have:

<input type="text" />  

i want to turn off predictive text using Javascript or any code automatically without need to go to settings and turn it off, so any one can help me ?

Upvotes: 3

Views: 5607

Answers (3)

Michael Aaron Safyan
Michael Aaron Safyan

Reputation: 95589

This doesn't exactly answer your question, but HTML5 introduces a bunch of new input types such as "email", "url", "search", etc. Using the best semantic "type" and then allowing the platform to make the decision of how to handle that type is generally better practice than changing the behavior of the input type in a way that will be inconsistent with how the platform generally handles that kind of input.

Upvotes: 0

Ryan
Ryan

Reputation: 14659

Using jQuery you can do something like this:

    // using a JavaScript object literal to change multiple attributes at once:
      $(document).find('input')
                 .attr({
                      autocorrect: 'off',
                      autocapitalize: 'off'
                  });

Upvotes: -1

johan
johan

Reputation: 6666

I've experienced this as well.

Try this

<input type="text" name="some_name" autocorrect="off">

Read this for more details

Upvotes: 4

Related Questions