Tuesday, June 19, 2007

Disable Browsers Autocomplete on a Rails Form

Intro

Autocomplete on a form can cause the observe_field not to fire (I was using on => keyup, i am going to change to on => blur and test)

Also the users get confused if too many things on a form, start autocompeting

The Solutuion

Simply disable autocomplete, Tested on IE/Firefox. This can be done at the form level

<% form_tag( {:action => 'post'}, { :autocomplete => :off } ) do %>

No comments:

Google