In web2py book, on chapter FORMS and VALIDATORS, section Forms and
Validators, it's written:
---------------------------------------
FORM and SQLFORM are helpers and they can be manipulated in as similar
way as the DIV. For example you can set a form style:
1. form = SQLFORM(..)
2. form['_style']='border:1px solid black'
---------------------------------------
I'm using this very way to set "_class" attribute and custom form to
show my form.
So, in my view I have:
{{=form.custom.begin}}
{{=form.custom.label.nome}} {{=form.custom.widget.nome}} <br />
{{=form.custom.end}}
But the "_class" attribute isn't rendered.
I did a code trace and discovered the _xml() method is called at form
creation time. This way, the "_class" attribute is there, inside my
form instance, but it isn't showed in my view.
Is it a bug or a book mistake?
How can I use it?
--
Vinicius Assef.