Disable autocorrect and autocomplete on TextBox

0 favourites
  • 4 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hello !

    Does anyone know how to disable autocorrect and autocomplete on TextBox?

    I'm trying to make a game where the player has to type words in a TextBox, and iOs keeps suggesting wrong words, and sometimes even replace the player's answers !

    I know it's possible to do this in HTML5 (by adding attributes like autocomplete="off") but I don't see the option for this in Construct 2.

    Or maybe I should add some javascript to the page that runs the game ?

    Any help would be appreciated <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yeah looks like you have to do it with javascript but you can do it inside C2.

    You can give the textbox an ID in properties and you can run javascript with the browser object.

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/autocompleteOff2.PNG" border="0" />

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/autocompleteOff1.PNG" border="0" />

  • I'll try this ! Thanks for your answer.

  • ramones

    Gotta bump this post.

    Recently created a project which is being exported to NW.js and has some TextBoxes with CSS.

    Now, NW.js apparently saves what I enter in the forms and autocompletes it.

    Wouldn't be much of a issue if autocomplete wouldn't cause this ugly yellow-ish overlay which overwrites my CSS:

    (Up: normal, bottom: autocomplete)

    I tried the javascript way you provided, but that doesn't work. And yes, I set the ID to the same ID as in the javascript.

    When googling, I also found html tags to remove autocomplete, but I obviously can't use that in C2.

    Any new way of disabling autocomplete for Textboxes?

    Thanks everyone.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)