Checkbox rendering depends on attribute order
Open
@jrauh01 is already working on this.
Since Aug 3, 2026.
bug
- Dominant language
- PHP
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
I have identified an issue where the order of attributes in the configuration array for a checkbox element affects whether it is rendered as checked or unchecked. This behavior is unexpected because the order of attributes in the array should not matter.
The following code works as expected, rendering the checkbox as checked:
$checkbox = $this->createElement(
'checkbox',
'checkbox-xy',
[
'class' => 'autosubmit',
'checkedValue' => 'a',
'uncheckedValue' => 'b',
'value' => 'a',
]
);
However, the following code renders the checkbox as unchecked, even though it should be checked:
$checkbox = $this->createElement(
'checkbox',
'checkbox-xy',
[
'class' => 'autosubmit',
'value' => 'a',
'checkedValue' => 'a',
'uncheckedValue' => 'b',
]
);
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.