any helpers, including a form, is a three:

form[0] is the table in the form
form[0][i] is the i-th row
form[0][i][1] is the 2nd column of the i-th row
form[0][i][1][0] is the INPUT inside that
form[0]['_class'] is the class attribute of the table
form[0][i][1][0]['_name'] is the name attribute of the INPUT
form.element(_name='email')['_class'] is the class attribute of the
element with attribute name=='email'

etc.

You can manipulate and change the form structure and form attributes
in this was any way you want.

On Jan 20, 4:19 am, vihang <vihan...@gmail.com> wrote:
> Hello,
>
> Is there any way I can iterate through a form? I want to construct a
> form, with two elements in a row instead of one, and use CSS instead
> of table.
> I know there is form.custom, but there I have to give the form element
> names explicitly. I want a generic solution for all forms I construct.
> Also in form.components, the form opening and closing is not part of
> it, (I guess).
>
> Thanks
> Vihang
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to