form = SQLFORM.factory(Field('apples','integer',label='Enter the Number of 
Apples'),
                                      Field('pears','integer',label='Enter 
the Number of Pears'))
if form.process().accepted: ....

On Friday, 16 November 2012 01:20:36 UTC-6, Paul Rykiel wrote:
>
> Greetings ... 
>  
> can someone tell me the best way to create a form which has entry fields 
> on in?
>  
> for Example:
>  
>       Enter the Number of Apples : _______
>       Enter thel Number of Pears: _____
>  
> I set up my code to look something like this:
>      apples = FORM(Input(_type="integer", _name="apples)).process
>      if apples.accepted:
>               db.apple.insert(no_apples=apples.vars.apples)
>  
> Two things: I would like the input fields to be processed on the same form 
> (I cannot seem to get this to work, and secondly I cannot get my program to 
> recognize the form.vars.apples
>  
> i am pretty new to Web2py but the book does not cover these basic things, 
> so forgive me for my query.
> Please help, if you can
>  
> Best Regards,
>  
>

-- 



Reply via email to