Hi Massimo,

I just discovered the lovely formstyle=lambda ... feature. (http://
web2py.com/books/default/chapter/29/7?search=formstyle)

It saves me from the headache of css. However, it is strange that the
value of "field_widget" parameter is a TD instance. Should it better
be a raw widget instance?

Example. Right now I have to use the ugly ".comonents[0]" notation:

    crud.settings.formstyle = lambda record_id, field_label,
field_widget, field_comment: TR(
        field_label, DIV(field_widget.components[0], field_comment))

I prefer:

    crud.settings.formstyle = lambda record_id, field_label,
field_widget, field_comment: TR(
        field_label, DIV(field_widget, field_comment))

If you like this idea, tell me to open an issue to track its progress.

Regards,
Ray

Reply via email to