AdvancedCustomFields / AdvancedCustomFields/acf

ButtonGroup field has no visual indicator when it is disabled

Open
#556 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

Hi. We have some custom JS logic that conditionally disables a ButtonGroup field. That functionally disables the field, but there is no visual indication that the field is disabled. See here, the field is disabled:

image (1)

Here is a video, that shows that clicking on the button does not do anything, as expected https://share.getcloudapp.com/v1u0GwE4

Here is the basic code we use:

    var fields = acf.getFields({name: 'column_content_expand'});
    var field = fields[0];
    field.disable();

If we do that to a Select field, it does get a visual indication that the field is disabled, so for consistency would be nice for the ButtonGroup field to support the same behaviour too.

We are seeing this behaviour in Advanced Custom Fields Pro v5.10.2

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.

Research direction

Start at the acf.getFields(...).disable() entry point and compare ButtonGroup behavior with Select, which already shows a disabled visual state. Done means a disabled ButtonGroup remains non-interactive and visibly indicates its disabled state, consistent with Select.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.