I'm trying to find a way how to submit multiple forms with ajax in one xhr.post call with dojo. The documentation at the bottom of this page says:
In fact, the attribute “form:” could be set on each node, not only on form nodes. If your page contains more than one form and these forms are enclosed with a div- or span-tag, then you’re able to submit all these forms, if you set “form:” to the surrounding div- or span-tag.
Specifiying the id of e.g. a div that contains multiple forms as the "form" attribute in an xhr call does not work:
xhr.post({
form: "idOfDivThatSurroundsManyForms",
...
});
It fails in domForm.formToObject, that really expects a form node (or id) which contains an elements attribute.
Is this part of the documentation just wrong or am do I miss something?
Do you have any ideas how to easily combine multiple forms into one xhr call in other ways?