nice point. :)
2013/5/10 Anthony
> Notice it is form.element(), not form.elements(). The first returns the
> first matching element -- the second returns a list (even if it contains
> only one match).
>
> Anthony
>
> On Friday, May 10, 2013 11:40:58 AM UTC-4, Ramos wrote:
>
>> *Note, form.eleme
Notice it is form.element(), not form.elements(). The first returns the
first matching element -- the second returns a list (even if it contains
only one match).
Anthony
On Friday, May 10, 2013 11:40:58 AM UTC-4, Ramos wrote:
>
> *Note, form.element() returns the first matching element, so no n
*Note, form.element() returns the first matching element, so no need to do
form.elements(...)[0].*
*
*
This does not seem true
if i remove [0] like this
a['_class'] = 'label label-warning'
i get the error
TypeError: list indices must be integers, not str
2013/5/10 Anthony
> Unless you are
Unless you are using formstyle='bootstrap', web2py does not add any class
at all to elements -- instead, the "w2p_fl' class is added to the
label's parent element (which is a TD, DIV, or LI, depending on the
formstyle). The 'bootstrap' formstyle adds a 'control-label' class directly
to the lab
4 matches
Mail list logo