Hi. I''m trying to add and validate objects using RJS. I have a page where if a user clicks on a link a form partial is inserted via javascript(depending on the click). If that form is valid I would like to remove it and display the object, otherwise rewrite the form with the errors inline(next to each field). I''m stuck at the point where I don''t know how to rewrite the form. On the first insert the div with the form has no unique id(since a user can click multiple times and insert multiple forms, and I need the update the proper one). My stupid idea is to generate a random number and pass that as an id to the div form and via hidden_field so I know what to remove/update. I''m sure there has to be a better way. I''ve been looking for tutorials but I haven''t found something specifically for what I want to do. -- M. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---