[TYPO3-mvc] CheckboxViewHelper does not work

Bastian Waidelich bastian at typo3.org
Thu Apr 22 00:51:03 CEST 2010


Stephan Petzl wrote:

Hi Stephan,

> is there a reason why the value attribute is not marked as "must have"?

Because it's optional for input tags according to (X)HTML spec. If you'd 
omit it in a classic checkbox tag
<input type="checkbox" name="showAddress" />
you'd have the same problem..


> only checkboxes which are checked will be included in the post, so it's
> not possible to unset a domain model's property.

That's probably rather an issue of Extbase than of the checkbox 
viewhelper because, again, it's just the default checkbox behavior: when 
you don't tick it, the field won't appear in the GET/POST vars (only in 
some browsers IIRC).

A workaround might be to add a hidden field from the checkbox 
viewhelper, but I'm not sure about this...

Bastian


More information about the TYPO3-project-typo3v4mvc mailing list