Tools

reisba said

reisba  

About midgardmvc_helper_forms...

2 comments

reisba posted to #midgard helsinki 26.01.2011 (fi)

2 comments

Bottom

reisba  

@bergie just wanted to ask an opinion how do you think midgardmvc_helper_forms should behave on default values. Here's the case I noticed:

I was trying to populate checkboxes to a template using the widget 'checkbox' ( <tal:block tal:replace="structure componen_name/form/field_name/checkbox" /> ) for a boolean form-field, but if a default value is not set, it throws an exception. So to use the widget you would need to manually always assign a value (true/false) to the field (which might not be the most obvious thing to know).

So would it be possible that the field would always return a boolean as a default (maybe not a good idea) or that the widget would simply always understand the field-value as a boolean and work egardless if the value is set or not.

reisba commented on posted to #midgard helsinki 26.01.2011 (en)

bergie  

@reisba in my view all fields should provide an empty value as default, overridable by set_value(). For boolean this ough to be false

bergie commented on posted to #midgard Punavuori 26.01.2011 (fi)

Login or register to leave a comment

Publicity
These messages are public and can be seen by anyone.