[FLOW3-general] fluid form.checkbox boolean

Heiko Kromm | Paints h.kromm at paints.de
Mon Apr 18 18:45:23 CEST 2011


Hi list, 

I'm building an input form for a new repository element. 
In my Domain Model I have a property isVisible, which is boolean. 

/** 
* Is visible 
* 
* @var boolean 
*/ 
protected $isVisible = true; 

Now I'm building an input form with fluid and have the field: 

<f:form.checkbox property="isVisible" id="isVisible" value="1" /> 

When I try to save my new element I will get an error-message, that isVisible is a string and that a boolean value is expected. 

Is there a best practice, how to get a boolean value into my object? I remember, that there are the initialize*Action methods, do I have to convert my value there? 

Thanks for your help. 

Kind regards 
Heiko 


More information about the FLOW3-general mailing list