Rails, Ajax, and the back button

When I go back to a page with a form, the text field fails to retain a
value. It was created with text_field_with_auto_complete. I want it to
retain the value entered previously.

Thanks in advance for any help…

Details:

I have a form created with
<% form_for :quote, :url => { :action => :myaction} do |form|%>

within the form I have an ajax field for another model

<% fields_for :classification do |classification| %>

Classification: <%= text_field_with_auto_complete :classification, :class_desc , :skip_style => true, :size => 60 %> <% end %>

Unfortunately, this field gets reset with the back button.

Thanks again for any help - it is driving me nuts

Desert P. wrote:

When I go back to a page with a form, the text field fails to retain a
value. It was created with text_field_with_auto_complete. I want it to
retain the value entered previously.

Thanks in advance for any help…

Details:

I have a form created with
<% form_for :quote, :url => { :action => :myaction} do |form|%>

within the form I have an ajax field for another model

<% fields_for :classification do |classification| %>

Classification: <%= text_field_with_auto_complete :classification, :class_desc , :skip_style => true, :size => 60 %> <% end %>

Unfortunately, this field gets reset with the back button.

Thanks again for any help - it is driving me nuts

If you look at the HTML source generated, does the input field have a
tag

autocomplete=“off”

I think that may be your problem. Try to see how you can get rid of
that.

Stephan