[TYPO3-mvc] Bug in FormHandling with checkboxes

Sebastian Kurfürst sebastian at typo3.org
Sat Dec 5 11:46:36 CET 2009


Hey,

> a, adding a hidden field to checkboxes and set it via JS
> b, implement behavoiur as of multiselect boxes, if there value is not
> present in request it gets unset.
Or output the following code:
<input type="hidden" name="myProperty" value="0" />
<input type="checkbox" name="myProperty" value="1" />

as the latter one overrides the first one, this should work.

> I don't really know where the "i have a form request and map it to the
> object" resides inside extbase. If you can tell me I would have look
> into variant b,
In the multiselect-box case: Is it really unset if no value is sent?
Hmmm - would not really expect this to happen. Maybe we need the same
trick there.

As the data mapper supports partial mappings, I am not sure if variant
b) works. The mapping takes place in Property_Mapper.

Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list