• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • As we have now upgraded the main XenForo community, this forum is now being retired. It will remain open in a mostly read only state. Any further feedback, suggestions or bug reports should be posted on the main forum. We will still process the existing bug reports from this forum.

    When we approach a stable release, this forum will become inaccessible. If there is any content you wish to save, please do so before then.

Fixed Disabled checkbox disabled but not formatted

Snog

Active Member
#1
If you disable a checkbox:
Code:
<xf:checkboxrow label="test">
    <xf:option disabled="disabled" name="dummy1" value="1">Test 1</xf:option>
    <xf:option name="dummy2" value="2">Test 2</xf:option>
</xf:checkboxrow>
The disabled checkbox is disabled, however it is not formatted in any way to show that it's disabled. It still looks like it can be checked when it can't.
 

Chris D

XenForo Developer
Staff member
#2
It seems to work if you set rowclass="is-disabled" but that's not particularly helpful if only one of the checkboxes should be disabled. It does mean, however, that the styling works correctly when you disable an entire checkbox row, e.g. via the disabler system.

But indeed there doesn't appear to be a way to mark a specific checkbox as disabled. I'd have expected the disabled attribute to handle it, or at least adding class="is-disabled" to the option.
 

Mike

XenForo Developer
Staff member
#4
IIRC, we intentionally split up separating the disabled styling from the disabled attribute to give more flexibility, though it was likely more in the context of buttons. It may be clearer to drop that, or at least do it via [disabled]:not(.some--modifier).

That said, I think there may be a specific regression here from the checkbox/radio replacement.