Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ChoiceFormField::isDisabled for checkbox #8348

Copy link
Copy link
Closed
@tamirvs

Description

@tamirvs
Issue body actions

Checking if a checkbox is disabled using isDisabled() returns false even when the checkbox really is disabled.

I looked through the code and I think the problem is this line because when I dumped the ChoiceFormField checkbox object this is what I got:

['options':private] =>
    array {
        array {
            'value' => 1,
            'disabled' => true
        }
    }
['value':protected] =>
    null

So obviously this $option['value'] == $this->value is false..
If when building the form I add an option 'value' => null to the checkbox form it works just fine.

Shouldn't the checkbox isDisabled function be different than the one for other choice inputs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.