yes. A helper (a FORM) acts as a list. You can append(), insert() and del 
its elements.

So this:
 form.add("%s : "%l,INPUT(_name="%s"%l))
Should probably be
 form.append(SPAN(LABEL(I),":",INPUT(_name=l)))


On Thursday, 29 March 2012 07:14:01 UTC-5, bussiere adrien wrote:
>
> is there a way to dynamically create a for like :
>
> liste = ["titi","toto"]
>
> form=FORM("UserName:", INPUT(_name='Username'),
>      "Email : ", INPUT(_name='email',_value=user.email),
> )
>
> for l in liste :
>       form.add("%s : "%l,INPUT(_name="%s"%l))
> # and at the end add the submit button :
> form.add(INPUT(_type='submit')) 
>
>
> Reagrds
> Bussiere
>
>
>

Reply via email to