Yes that works , but it only focuses on my form not my template. How can i
contain it as a form on my present template as I am doing with the LOAD
function.
On Friday, August 4, 2017 at 5:15:17 PM UTC+1, Jim S wrote:
>
> Your db.py is fine.
>
> default.py should contain:
> def order():
> response.view = 'default/order.html'
> order = SQLFORM(db.order,
> submit_button='Buy!',
> buttons=['submit'],
> formstyle='table3cols')
> if order.process(keepvalues=True).accepted:
> session.flash = 'Order submitted.'
> redirect(URL('payment'))
> elif order.errors:
> session.flash = 'Error.'
> else:
> session.flash = 'Please enter a wallet address.'
> return dict(order=order)
>
>
> order.html should be:
>
> {{extend 'layout.html'}}
> {{=order}}
>
>
> Tested on my system and works as expected.
>
> -Jim
>
>
> On Friday, August 4, 2017 at 10:51:30 AM UTC-5, Samuel Gosling wrote:
>>
>> I declared that that didn't work unfortunately, if you read my text
>> properly. Appreciate the suggestions nonetheless!
>>
>> On Friday, August 4, 2017 at 3:52:56 PM UTC+1, Áureo Dias Neto wrote:
>>>
>>> Your 'form' is in the variable order, here: order =
>>> SQLFORM(db.order,...
>>>
>>> use {{=order}} in the view
>>>
>>
--
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.