• Resolved jabbadu

    (@jabbadu)


    Hi,

    the toggle-field function breaks some sub-fields.
    I have several flexible fields with a “headline” field.

    If I now create content with several FC fields and hide one of them, the headlines of the fields defined above are displayed in the remaining parts.
    This phenomenon only occurs in the front end.

    Did u see what i mean? 🙂

    sorry images:
    Backend
    Frontend

    • This topic was modified 3 years, 1 month ago by jabbadu. Reason: add images
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback! I’ve run some tests, and everything works fine here. I don’t know how you display your Flexible Content on the front-end, but I would recommend to use the get_flexible() or the_flexible() helpers if you’re using the Dynamic Render setting. See documentation: https://www.acf-extended.com/features/fields/flexible-content/dynamic-render-example

    If you’re not using the Dynamic Render, then I recommend using the native have_rows(): the_row() method with get_sub_field(), as described in the ACF documentation: https://www.advancedcustomfields.com/resources/flexible-content/

    Hope it helps!

    Have a nice day.

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello @jabbadu,

    Just a heads up regarding this report. I had a similar report today, about the “Toggle” function which duplicate front-end layouts. I found the cause of the problem and a fix will be added in the next patch.

    In the meantime, you can apply the fix by yourself:

    In the file: /acf-extended/includes/fields/field-flexible-content-actions.php line:415

    Add the following code (before the return $value;):

    $value = array_values($value);
    

    Sorry for the inconvenience.

    Have a nice day!

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Flexible Content toggle breaks sub-fields’ is closed to new replies.