The answer is here in the book: 
 http://web2py.com/books/default/chapter/29/07#FORM

To summarize, use the: 

if form.accepts(request,session):     # read further down in the book for 
shortcuts and a better understanding

...to validate the form.  If it passes validation, then use the DAL insert 
method to insert into the database. 
 http://web2py.com/books/default/chapter/29/06#insert

Ex:  db.table_name.insert(field_name_1="value for field1", 
field_name_2="value for field2")

However, if you want to get the full value out of web2py, look at SQLFORM. 
 The .grid will do all of this for you if your model is setup properly.

-Jim

On Thursday, February 21, 2013 9:16:49 AM UTC-6, Waqas Iqbal wrote:
>
> form=FORM(SPAN('Default Group', _class='label'),
>              SELECT(group_names, _name='group', _id='hospitalDropdown', 
> _class="select"),
>               INPUT(_type='submit',_name="fancyGroupUpdate", 
> _value="Submit"))
> that's how i created my form..... 
> lots of thanks.....
>
> Best Regards,
>
> Waqas Iqbal | Associate Software Engineer
>  
> [image: Inline image 1] <http://www.knysys.com/>
>
> W +92-21-34972358 | M +92-342-3146972 
>
> Gtalk: waqasiqbal.knysys| [email protected] <javascript:>
>
> www.knysys.com | www.knyapps.com
>  
>
> On Thu, Feb 21, 2013 at 6:22 AM, Jim S <[email protected] <javascript:>> wrote:
>
>> Also, have you read this chapter of the book?  
>> http://web2py.com/books/default/chapter/29/07
>>
>> Lots of good info there.
>>
>> -Jim
>>
>> On Thursday, February 21, 2013 5:22:23 AM UTC-6, [email protected]:
>>
>>> how should i update my database on pressing submit button??
>>>
>>> -- 
>>  
>> --- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
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/groups/opt_out.


Reply via email to