Am supposed to be learning French at the moment, but rather than learning any vocab, I've been mucking around with a rails app that tests vocab - so it displays a word, and I have to type its translation.
Unfortunately, Firefox remembers everything I've already type there, so which diminishes its usefulness somewhat.
Is it possible, through the options for form_for or otherwise, to turn this normally useful behaviour off?
Add autocomplete="off" onto <form> element; Add hidden <input> with autocomplete="false" as a first children element of the form.
Uncheck the box next to "Remember search and form history." After you uncheck this box, Autocomplete will be disabled in Firefox.
So it turns out it's pretty simple. Rather than
<%= f.text_field :fieldname %>
put
<%= f.text_field :fieldname, :autocomplete => :off %>
You can also turn off autocomplete at the form level by using the :autocomplete attribute in the :html collection, which will generate the HTML that Erv referenced. The syntax is
<% form_for :form_name, @form_name, :html => {:autocomplete => "off"} do |f|%> ... <% end %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With