Thanks Anthony, that is the idea.
Besides the multiple button scenario, and as explained in the initial post,
the serialization should include the button name and value if one was used
to submit the form, just like it happens with a non-ajax trapped submit.
And it seems simpler that buttons that change hidden fields, if that is
what the other idea is about.
Denes
On Friday, November 7, 2014 3:38:24 PM UTC-5, Anthony wrote:
>
> On Friday, November 7, 2014 2:23:02 PM UTC-5, Leonel Câmara wrote:
>>
>> You can just use a hidden field, like formname, or event better you can
>> have different actions for the forms. As for the code, I don't like that
>> this is triggered for all clicks in the form, maybe form.on('click',
>> '[type="submit"]', .... You also need to encodeURI the submit button's
>> name and value.
>>
>> Frankly, I don't like this much. I think this should be accomplished with
>> the form's action.
>>
>
> I think the idea is to have web2py handle this automatically so the user
> doesn't have to manually code hidden fields for submit buttons whenever
> Ajax is used. Handling this in JS is probably easier than hacking the
> server side code to insert hidden fields.
>
> Anthony
>
--
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.