forms within forms

Hi Shandy,

Shandy Nantz wrote:

Simple question...I think.

Can you use the helper methods to create form_remote_tag within one another? I have tried but everytime the page seems to become confused on which form is which.

No. The W3C spec forbids the nesting of forms. You can, however, have more than one form on a page. Depending on what you're trying to accomplish, and as long as you're using Ajax, this can work well. But you'll have to figure out whether or not you're going to allow use of the site by visitors who have JS disabled and, if so, how you're going to provide equivalent functionality to them.

hth, Bill

If you are just trying to include fields from multiple objects in your form, have a look at the fields_for helper.

http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000495