Howto keep already entered form fields


#1

Hi,

is there a way to keep the already entered form fields when the form is
re-displayed after some error has been detected and reported to the user
via flash?

Regards
IJD


#2

IJD,

Try using <%= text_field “object_name”,“field_name” %> rather than
typing the html for the form input fields. If the object is in the
request, than it will be filled in properly if that field has a value.
In your controller just make you sure you have a instance variable
called @object_name.

Make a scaffold to see more examples of this.

-Curtis


#3

Curtis Spencer wrote:

IJD,

Try using <%= text_field “object_name”,“field_name” %> rather than
typing the html for the form input fields. If the object is in the
request, than it will be filled in properly if that field has a value.
In your controller just make you sure you have a instance variable
called @object_name.

Make a scaffold to see more examples of this.

-Curtis

thx!