Support

Account

Home Forums ACF PRO ACK Checkbox: Values are removed from the Custom Choices when Unchecked

Helping

ACK Checkbox: Values are removed from the Custom Choices when Unchecked

  • I built a custom field groups with repeated fields for Questions and Answer options. One of the field is a checkbox field for the multiple choices which I enabled “Allow custom values to be added” since the choices for each questions will be different.

    https://prnt.sc/26xcxal

    No matter how I changed the settings like saving the custom values to the field’s choices. Still the same issue happens.

    Here’s a screenshot in the post meta where I added 4 custom values. Since the question only has 1 correct answer, I need to uncheck the other 3 choices.

    https://prnt.sc/26xcvpn

    Just like what you can see in the following screenshot.

    https://prnt.sc/26xcw3o

    Now when I save or update the post, all the other choices are gone except for the only checked one.

    https://prnt.sc/26xcwqi

    How can we preserve the values even if they are unchecked?

    Thanks for your help.

  • You must set “Save Custom” to yes.

    What happens when you have it set the way you do.

    ACF gets the choices allowed by the field. These are the only choices that will be shown every time. ACF then gets the value for the current field. If the field allows custom values and the value is not one of the values added by the field then ACF adds it to the choices.

    Without saving custom values to the field ACF has no way to determine what other values should be listed. It only has the choices set by the field and the current value of the field to work with.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.