Create the form the way you normally would:

in your controller:
form = SQLFORM.factory(....)


or


form = SQLFORM(.....)


or 


grid = SQLFORM.grid(...)
form = grid.update_form



then in your view, instead of {{=form}} put in something like this:
{{=form.custom.begin}}    ----  inserts the <form> tag into your view
    {{=form.custom.label.field_1}}:   {{=form.custom.widget.field_1}}    --- 
inserts the label for field_1 and then appropriate widget for field_1
    {{=form.custom.label.field_2}}:   {{=form.custom.widget.field_2}}    --- 
inserts the label for field_2 and then appropriate widget for field_2
    {{=form.custom.label.field_3}}:   {{=form.custom.widget.field_3}}    --- 
inserts the label for field_3 and then appropriate widget for field_3
    {{=form.custom.label.field_4}}:   {{=form.custom.widget.field_4}}    --- 
inserts the label for field_4 and then appropriate widget for field_4
    {{form.custom.submit}}
{{=form.custom.end}}


then just format around the fields with HTML as you see fit.

-Jim




On Thursday, January 5, 2017 at 10:18:46 PM UTC-6, Wellington Faria wrote:
>
> Hi.
>
> I don't understand  how i use it:
>
>
>    - form.custom.label[fieldname] contains the label for the field.
>    - form.custom.comment[fieldname] contains the comment for the field.
>    - form.custom.dspval[fieldname] form-type and field-type dependent 
>    display representation of the field.
>    - form.custom.inpval[fieldname] form-type and field-type dependent 
>    values to be used in field code.
>
>
> Please, somebody can give me an example about each  variables, describe 
> above. 
>
> Thanks. 
>   
>

-- 
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