By using server-side DOM and parsing ( see the book 
http://www.web2py.com/books/default/chapter/29/05/the-views?search=DOM#Server-side-DOM-and-parsing
 ) 
you could collect all textareas and after make a loop on the collection to 
change the css class. For example in your controller

all_textareas = the_form.elements('textarea.text')

for a_textarea in all_textareas:
    a_textarea['_class'] = "myclass"



Il giorno venerdì 4 ottobre 2013 19:14:33 UTC+2, Francisco García ha 
scritto:
>
> Hello all,
>
> I am loading a form from a database table, with CRUD or SQLFORM (It is the 
> same for me).
> This form contains text fields and textarea fields between others.
>
> Now, I need to change in the views the class of all textareas,  from class
> ="text"  to class="myclass"
> How can I do this from controllers or views?   (I can't edit any css file).
>
> I am trying with form.custom.widget  but I can't change it.
> I'm not sure if it is something simple, or it is impossible to do this way.
>
>
> Thank you in advance.
> Regards,
> Francisco
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to