Support

Account

Home Forums Add-ons Repeater Field Conditionals of Subfield disappear on save

Solved

Conditionals of Subfield disappear on save

  • Many many thanks for the repeater conditional Support!

    Unfortunately I’ve found inconsistent behavior. I have reproduced it using the following steps.

    1) Create a new field group.
    2) Create a radio/select field that has 7 alternatives to choose from (these are subtypes)
    3) Create a repeater field with a text subfield. This subfield has the conditional “if type is 1 or 2 or 3 or 4 or 6 or 7”.
    4) Save the field group.
    5) Then look for the conditional rules of the subfield.

    Expected: the rules are still the same.
    Actual behavior: some rules are missing.

  • Hi @benjaminpick

    Thanks for the bug report.

    I’ll do some testing.

    Thanks
    E

  • Could you reproduce the issue? Or should I create a clean install and try there?

  • Hi @benjaminpick

    I can confirm that on my local install, I can create a text sub field which contains tall 7 conditional logic rules from the 7 radio button choices…

    I would try on a clean install. You may find that the issue was more to do with a server limit on how many variables can be posted at one time.

    Hope that helps.

    Thanks
    E

  • I have the same issue. I can save 2 lines conditional options but adding a 3rd conditional requirement fails and the new ruels are not saved.

  • Ok, I resolved this. Couple of things to try – Ensure that the order of conditionals is correct, I had mine a bit messed, was adding an item in the middle instead of appending it to the end. I also increased the max_input_vars tp 6000 and threw the max_input_nesting_level to 10000.. I cannot say if they made a difference, I have limited time to test, I’m fairly confident that its the order that caused it to remove conditionals…

  • Hi guys

    Thanks for the bug report.
    I have tracked down and fixed the issue. You will find a fix in the github repo.

    The issue was caused when you add a new rule but use a ‘+’ button which is not the last one in the list.

    Thanks
    E

  • Many thanks! Updating ACF & ACF Repeater solved the issue.
    However, there is a little visual glitch: the margin-top of .acf-button-add.add-row-before needs to recalculated each time that the conditional display changes (right now, the plus sign “create a new repeating element” jumps up and down), not only on mousenter of the row.

  • I also had to increase max_input_vars for my mega custom type …

  • Hi @benjaminpick

    Thanks for the bug report. I’ll add this to the todo and have a solution soon

    Thanks
    E

  • Hi @benjaminpick

    Thanks again for the UI bug. I have found and fixed this issue. All that was needed was to trigger a ‘mouseover’ event when a sub field was conditionaly hidden / revealed.

    I have pushed the fix to the repeater field repo, so you can re-download the add-on to get this code fix.

    I won’t release this as a new version just yet, I will wait to bundle some more fixes.

    Thanks
    E

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

The topic ‘Conditionals of Subfield disappear on save’ is closed to new replies.