• Resolved David Bee

    (@davidbawiec)


    Thanks for a truly fantastic plugin! You rocked it! ??

    I do have a bug that I need to report: In version 0.8.5.5 of ACF-Extended, if you’re using a flexible content field with conditional logic between certain fields (for example show the second field only if the first field has some value), it works great on the back-end (admin). However, if you’re using acf_form() to generate the field group on the front-end, sadly the conditional logic breaks.

    Disabling the ACF-Extended plugin fixes this, which leads me to believe it’s an issue with ACF-Extended somewhere.

    Please advise.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the report. This problem has been reported and will be fixed in the next patch. See Trello Task: https://trello.com/c/w6owa6vr/187-dynamic-forms-repeaters-with-conditional-logic-in-sub-fields-arent-working-correctly-in-the-front-end-due-to-front-end-js-featur

    For your information, this bug was introduced in the last patch, in an effort to allow conditional logic to work with custom ACF Form HTML render in the Dynamic Forms UI. In fact, out of the box, ACF conditional logic doesn’t work with it.

    For example, this code wasn’t working with ACF conditional logic:

    
    <div class="my-class">
        <div class="acf-field acf-field-checkbox ...">
            <div class="acf-input">...</div>
        </div>
    </div>
    
    <div class="my-class">
        <div class="acf-field acf-field-text ...">
            <div class="acf-input">...</div>
        </div>
    </div>
    

    The implementation of this enhancement introduced the problem you described with complex fields like repeaters & flexible content. The next patch will fix that.

    In the meantime, you can apply the fix by yourself with this insctructions:

    In the file acf-extended/assets/acf-extended-form.js line:43. Replace:

    var field = acf.getField( rule.field );

    With:

    
    var field = target.getField( rule.field );
    
    // ACF Extended: Check in all form if targeted field not found
    if( target && !field ) {
    
        var field = acf.getField( rule.field );
    
    }
    

    Have a nice day!

    Regards.

    Thread Starter David Bee

    (@davidbawiec)

    That’s marvelous news! Looking forward to the fix!

    Also, may I say: I love you Trello gifs. ??

    Cheers!
    David

    Had the same issue but the solution offered by @hwk-fr solved. I am really a big fan of acf-extended and @hwk-fr, the author. You turn take acf on a whole other level. keep on buddy…

    • This reply was modified 4 years, 9 months ago by michnet.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional Logic breaks on front-end form flexible content layouts’ is closed to new replies.