[TYPO3-mvc] CheckboxViewHelper -> $this->propertyValue()

Stefano Cecere scecere at krur.com
Wed May 22 13:10:02 CEST 2013


this problem still persists (at least on 4.7)
  the only solution i fould is as Henjo says: setting the "booleans" to 
'1' and threat them as integer..




On 13/02/12 09:58, Henjo Hoeksma wrote:
> Hi guys,
>
> you might resolve this setting the default of the property to be zero:
>
> protected $variable = '0';
>
> NULL is not the same as 0 or FALSE.
>
> Kind regards,
>
> Henjo
>
> Problems are small because we learned how to deal with them.
> Problems are big because we need to learn how to deal with them.
>
>
> On Fri, Feb 10, 2012 at 12:06, Martin Ernst <ernst at alto.de> wrote:
>
>> Have you been able to resolve your problem?
>>
>> I am having the same problem here. A form with a checkbox is fully
>> functional. The correct state of the checkbox is always saved.
>>
>> I have an own validator for my form. If the Validator fails, I return to
>> the form. It is a form bound to and edit/update action. All values from the
>> current object are filled in the fields, not the values from before posting
>> the form. AND I get the error message for my checkboxes:
>>
>> "Checkbox viewhelpers can only be bound to properties of type boolean or
>> array."
>>
>> I am very much interested in a solution.
>>
>> Greetings
>> Martin
>>
>> Am 31.01.2012 10:42, schrieb Claus Due:
>>
>>   Hi Mark,
>>>
>>>   Can I assume that if values typed in textfields after submitting the
>>>> form are shown in the form again after failing validation, that the
>>>> formObject is not NULL?
>>>>
>>>
>>> This is the key ;)
>>>
>>> No, you cannot always assume this. I suspect you may have NULL instead of
>>> a form object - try debugging that in either your Controller or template
>>> file.
>>>
>>> Cheers,
>>> Claus
>>>
>>
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>


-- 

-- --- ----- -------

Stefano Cecere
KRUR studio - http://krur.com


More information about the TYPO3-project-typo3v4mvc mailing list