Home Forums Bug Reports changing checkbox value breaks tab functionality


changing checkbox value breaks tab functionality

  • Hello,

    I’ve made a custom field group in the backend with 2 tabs with several fields. One of the tabs is conditionally show when a checkbox field is checked in the other tab. This was working beautifully, until I’ve decided to change the only value of the checkbox. After changing the value (no other actions, like adding more options), the checkbox isn’t checked anymore on the pages where it was checked before. When I check the checkbox the other tab isn’t displayed anymore.

    On the frontpage the fields from the 2nd tab are still shown. So the data is still there and the fields are still active.

    I’ve checked the conditional logic on the 2nd tab field and it displays the new value of the checkbox correctly. What else can I check / do to fix this?

    I’m using wordpress 4.5.3 with ACF PRO

  • Hi @araker

    When you changed the checkbox value on the field group editor page, it won’t change the value for each post/page in the database. That’s why the checkbox isn’t checked anymore because it still has the old value in the database, which is different from the new one.

    To fix it, you need to perform SQL query to change the old value to the new one or resave each post/page that has the value set.

    The conditional logic also depends on this value, so changing it will make the conditional logic broken. Kindly reset the rule again to fix it.

    That being said, changing the options value is not encouraged as it can cause confusion in your system. If you can, please change the options label instead.

    I hope this makes sense 🙂

  • Thanks, that solved my problem.

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

The topic ‘changing checkbox value breaks tab functionality’ is closed to new replies.