You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
There is also the nested form setup, but your objects will need a common parent. Can you sketch out your use-case, including any related models? There may be a simple solution that your question doesn't trigger in those of us who have read it.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
Try to describe it more clearly.
Let me give you an example scenario:
Model is user. Where you want to register multiple users in same form. Simple RHTML/HTML to display form and button to clone the form below. You can regenerate same html with javascript and name the text_field with index like this HTML <div id='user_wrapper'> <%= text_field_tag "user[0][name]" %>. </div>
Each time you clone the form increase index+1 in your javascript function. When you submit a form you will receive hash with all users details. js function would be like function clone_form(){ var count = parseInt($('count').value); count = count+1; $('count').value = count; var fields = '<div id='user_wrapper'> <input type="text" id= "user_'+count+'_name" name="user['+count+'][name]" </div> ' $('user_wrapper').insert(fields); }