How to retain the values of textboxes if validation is there

Ruchita S. wrote:

Karthi kn wrote:

I have checked it by changing the id as user_login and by deleting the
value="".
Its not working.

Is it throwing any exception or is the value not retained in UI?

Not throwing any exception… but it is not retaining the values in
the textfields.

Try adding ’ value="#{@user.login}" ’ in input tag.

GAH!

Just please use the text_field helpers. They set all this information
FOR
YOU.

<%= text_field “user”, “login”, :onclick => “alert(‘test’)” %>

Ruchita S. wrote:

Karthi kn wrote:

Can you please show your ‘sign_up.rhtml’ view file also?

It is a very big file.
Let me show you only two fields from that file with form tag.
Javascript validations are also there.

Change the id of the text tag to ‘user_login’ and is same with the other
fields.

My suggestion is that, it will be much better if you start using the
rails ‘text_field’ tag instead of html ‘input type=“text”’ tag.

Please fill this form for registeration
Note: Fields marked with * are mandatory
  
*Login
*Password
*Confirm Password
class="textFields"/>