Icinga / Icinga/ipl-html

Checkbox rendering depends on attribute order

Open
#140 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.