Home Forums Backend Issues (wp-admin) Conditional Logic in Flexible Content NOT WORKING


Conditional Logic in Flexible Content NOT WORKING

  • I have several layouts in a flexible content field all of which share the same 7 sub fields. Some of these subfields visibility in the backend is controlled by conditional logic from some of these said fields per layout. The topmost layout (as displayed in the custom fields dialog), when loaded as a new row in the backend, it’s conditional logic is working as expected. However every other layout is not. I’ve tried renaming some of the Field Names for these fields which interact with the conditional logic in each layout to be unique yet still the problem persists. I’m not sure what could be causing this if all the keys are different (though I’d like them to be the same if possible). Please let me know if I need to make anything clearer. Thanks!

  • Conditional login works on the field keys and not the field name. I just did a test and it’s working fine for me. There are 2 conditions that I can think of that might cause your problem.

    1) You’re fields that the condition is based on have the same key.

    2) The might happen if you duplicate a field in one layout and drag it to another layout. In this case the field’s conditional logic may have the wrong field key.

  • I am having this same issue and I did duplicate a field and drag it to another layout. Is there a fix or workaround for this issue other than manually re-creating these fields? This is a complex flexible content group and I’d rather not have to manually re-create dozens of fields. Please help!

  • There isn’t any simple way to correct the issue of duplicating a field and moving it to another layout, at least none that I’ve found. Anyone seeing issues might want to open a new support ticket.

  • For anyone who may run into this issue, I figured out what was happening for me. I was using the Local JSON feature and for some reason it wasn’t updating the JSON even though my permissions were correct. I deleted the JSON files and it solved my problem. But then I had a new issue because it still wasn’t creating JSON files, and I solved this by using the save_json filter documented on this page:

    I hope this helps someone! I love ACF but this was a very frustrating experience for me.

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

The topic ‘Conditional Logic in Flexible Content NOT WORKING’ is closed to new replies.