Actions
Bug #101182
openCheckbox is always checked for each value in a form with object property with a value
Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2023-06-27
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
Add a Fluid Template with a form and a checkbox bind to object property like this :
<f:form action="..." name="country" object="{country}">
<f:form.checkbox property="money" value="dollar" />
<f:form.checkbox property="money" value="euro" />
<f:form.checkbox property="money" value="yen" />
</f:form>
If object property already has a value, ex. : country.money = euro
Then all check boxes have the attribute checked while only the second one should be checked.
The problem is because the CheckboxViewHelper cast the values in boolean while it could be everything (string, int, boolean, etc.).
$checked = (boolean)$propertyValue === (boolean)$valueAttribute;
Actions