I have a page in which multiple forms may be submitted.
* the main/primary form (which is mandatory) is generated with SQLFORM and
is always present on the page (i.e. it is generated server-side when the
page is loaded)
* additional forms may be added to upload images. These forms are generated
with SQLFORM, and created or deleted by the user with a button that calls
web2py's ajax function:
... ajax('{{=URL('default','generate_image_form')}}', ['form_number'],
$target_divs[$i]); ...
I was thinking of submitting all of the forms with one button, as in the
code below:
<button onclick="jQuery('form').each(function() {jQuery(this).submit
();});">Submit all</button>
However, while this causes the main/primary form to perform validation, as
desired, the ajax-generated forms disappear. What is the correct way to
have all the forms validate/submit with a single button?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.