Home Forums Gutenberg ACF 5.8. Beta 3 – Clone Field Problem


ACF 5.8. Beta 3 – Clone Field Problem

  • Hey, in the newest beta of ACF the clone field is not working correctly inside Gutenberg blocks. When I try to clone fields into two separate groups, the fields can not be read correctly via get_field() or the_field().

    Example below.
    So, here are my custom fields, that I want to clone:
    acf fields

    Here are my clone fields:
    clone field 1
    clone field 2

    Here are my setting inside the gutenberg block:
    block settings

    Here is my code:

    print_r( get_field( 'font_settings' ) );
    echo "<br/>";
    print_r( get_field( 'font_secondary_settings' ) );

    And here is my result after saving the block setting:

    Array ( [font_type] => custom [font_family] => Arial [font_color] => #000000 ) 
    Array ( [font_type] => custom [font_family] => Arial [font_color] => #000000 )

    As you can see, the values doesn’t match with the block settings.
    Inside the block panel, everything is fine (correct font name and color even after reloading the page), but in gutenberg preview and on the frontend the result is incorrect.

    Is there a way I can bypass this issue and keep the clone field?

  • @wppal

    Thanks for the question.

    The Clone Field is not yet supported for ACF BLocks in 5.8.0-beta3.
    We hope to address this issue in 5.8.0-beta4 and will hopefully begin work on this shortly 🙂

  • Any progress here? I’m still having trouble getting the clone field working inside a block.

    Use case: we have a select field with form IDs, so the author can select with form shows inside the block. We have lots of blocks with forms and only want to maintain one list of IDs (the field being cloned).

    Any ideas?

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

The topic ‘ACF 5.8. Beta 3 – Clone Field Problem’ is closed to new replies.