XPages Tip – Disable Autocomplete on All Fields via the Theme
In my last post, I showed how to disable autocomplete on a single field. In this post, I’ll show how to disable it application-wide via the theme.
If you want to prevent autocomplete on all fields in your application, you can do it in one fell swoop by adding this code to your theme:
<!-- Set all edit box controls to disable autocomplete --> <control> <name>InputField.EditBox</name> <property mode="override"> <name>autocomplete</name> <value>off</value> </property> </control>
This will automatically insert the
autocomplete="off" attribute into all Edit Box controls in the application.
Here’s an example of what a field now looks like in the browser page source:
<input type="text" id="view:_id1:AutoComplete" name="view:_id1:AutoComplete" autocomplete="off" class="xspInputFieldEditBox"><br>