Forum: Ruby on Rails Validation of form fields

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
27fbc64f8d0faf94a0a2a41ff13b5ae0?d=identicon&s=25 Thya Athi (athi)
on 2007-06-12 14:29
   I have a form that contains two fields :
  Actor - text field
  Movie - text field. On clicking Add another movie link, I am
displaying another text field for entering another movie using AJAX.
  So on clicking submit , i am doing validations for the form fields. If
there is an error in the form fields, the text fields we have added
using AJAX, disappears. Is there any to solve this problem ?

  Also what name should I give to the added text field for Movie ? In
movies table the name of the field is moviename.
  Can we give like <%= text_field 'movie','moviename' %>.
  But we have to save all the movie names entered into the movies table
with actor_id as the foreign key. How should we name the movie text
field in this case?

  Can anybody help me out in this?
This topic is locked and can not be replied to.