Because probably Rques is type 'string' not 'text' so it rendered by a
INPUT not a TEXTAREA

On Mar 15, 5:46 am, JmiXIII <sylvn.p...@gmail.com> wrote:
> Hello,
>
> I'd like to format a string field in my view of a SQLFORM. I manage to
> do it via :
> form.element(_name='field')['_attribute']=x
> Whereas it works fine for a datetime and an integer field, it doesn't
> work for a string field, which I suppose is render with a textarea
> widget.
>
> Here is an exemple of what I did:
>
>     Form2=SQLFORM(db.LigneOF,fields=
> ['Date','Equipe','Cdebut','Cfin','Qrebuts','Rques'],
> hidden=dict(OF=CodeOF), submit_button='Sauver')
>     Form2.vars.OF=CodeOF
>     for champs in ['Date' ,'Cdebut', 'Cfin','Qrebuts']:
>         Form2.element(_name=champs)['_size']=9
>     Form2.element(_name='Rques')['_rows']=2
>
> The last line (field 'Rques') doesn't work, could you give an idea
> why ?
>
> Thank you
>
> PS : I use also {{=Form2.custom.begins}}.....
> {{=Form2.custom.widget.field}}.... for rendering my form

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