That's what I would have thought, but if I have the following in my view:

<form action="{{=URL(c='pay',f='charge',args=request.args)}}" method="POST">
  <script
    src="https://checkout.stripe.com/checkout.js"; class="stripe-button"
    data-email="{{=auth.user.email}}"
    data-key="{{=pk}}"
    data-amount="{{=amount}}"
    data-name="UKI TMS"
    data-description="{{=description}}"
    data-image=
"https://stripe.com/img/documentation/checkout/marketplace.png";
    data-panel-label="{{=label}}"
    data-locale="auto">
  </script>
</form>

and the following in my `pay` controller:

def charge():
    return DIV("%r"%request,_class="well")



the displayed value of `request._post_vars` is None.  Same thing if I don't 
specify `args` in the action URL, or leave the action URL empty (and 
display `request.env` from the appropriate controller).

Poking around the DOM, I see that there is *another* form inside of mine, 
and this is the form which contains the "submit" button (along with all of 
the input fields).

Even more confused now,
Scott

On Thursday, March 23, 2017 at 9:28:50 AM UTC-4, Anthony wrote:
>
> If the form is submitted via a POST request, everything will be in 
> request.post_vars (request.post_vars is not specific to web2py-generated 
> forms -- it is simply where posted data are made available).
>
> Anthony
>
> On Thursday, March 23, 2017 at 4:52:56 AM UTC-4, Scott Hunter wrote:
>>
>> Suppose I have a form whose contents are generated by a script, and I do 
>> not know what those contents are; in particular, I may not know what the 
>> fields are within that form, but I certainly have no control over them.  I 
>> can specify the controller that I want that form to submit to (via the 
>> `action` attribute).  Is there a way, within that controller, I can get the 
>> content of that submission (what would show up in `request.post_vars` for a 
>> web2py-generated form)?  Does it help if I know the names of these fields?
>>
>> - Scott
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to