I agree, but may be a backward compatibility issue (though I suspect usage 
of the lambda option is quite rare).

Anthony

On Saturday, December 24, 2011 4:39:58 AM UTC-5, Ray (a.k.a. Iceberg) wrote:
>
> 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