XPages Tip – Disable AutoComplete on a Field

Browsers will often remember values that you enter in fields and provide typeahead/autocomplete functionality for you when using fields with those same names in the future. This is also true of fields on your XPages forms by default. In this post, I’ll show you how to disable this on an input text control.

Disabling autocomplete is a very simple change to make. Just select your input control, go to All Properties and set the autocomplete property (under basics) to off.

AutoComplete1

To test the property, I created a simple page that has two fields bound to a form. I left the first field alone, but I set autocomplete to off on the second field. I submitted the form a number of times, entering ‘Name1’ into both fields, then ‘Name2’, and so on.

After several rounds of this, when I type an ‘N’ into the first field, I got a typeahead list of all of the values that I had entered that began with the letter ‘N’.

AutoComplete2

However, in the second field, even though I entered all of the same values as the first field, there was no typeahead.

AutoComplete3

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: