Vihang,
something like this should get you started:

for e in form.components[0]:
  print e[0][0] # labels
  print e[1][0] # non-labels

Denes

On Jan 20, 5: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