So I know that you cannot nest forms in HTML as I’ve found out today,
but I have a need to do this or get around it.
You can see the admin panel I’m building at:
Click on the empty space in one of the table results to fly out
complete subscriber data.
In there, there’s a submit, I was trying to have a form for each
subscriber which submits.
I also need a form around the checkboxes though, so I can handle the
functions in the right panel such as select all, add selected to
category, etc. etc.
The trouble is, that in my code involves nesting a form around the
checkboxes (which involves nesting around the rest of the results). So
I need a faux way to nest forms, or another workable solution if anyone
has dealt with this.
the code is like this:
<% for subscriber in @subscribers %>
<%= check_box(‘subscriber’, ‘checkBox’, :name => ‘subscriber_ids’,
:id => subscriber.id )%>
<%= text_field(‘subscriber’, ‘firstName’, :value =>
subscriber.firstName ) %>
<%= text_field(‘subscriber’, ‘lastName’, :value =>
subscriber.lastName ) %>
<% end %>
If anyone has experience with this, it is much appreciated.