Support

Account

Home Forums Add-ons Repeater Field Repeater field in gutenberg?

Helping

Repeater field in gutenberg?

  • Hello, i am struggeling with the repeater field in a gutenberg field. Can some on give me advice of tell me what i am doing wrong? Or is this even possible?

    When i use @if(have_row() etc.. i am not getting the information i want. But i am receiving the information from a else statement.

    I am using sage10 en acf pro.

    {{–
    Title: SellingPoint
    Description: Selling Points
    Category: formatting
    Icon: table-row-after
    Keywords: sellingpoint quote
    Mode: edit
    Align: left
    PostTypes: page post
    SupportsAlign: left right
    SupportsMode: false
    SupportsMultiple: false
    EnqueueStyle: styles/style.css
    EnqueueScript: scripts/script.js
    EnqueueAssets: path/to/asset
    –}}

    @php
    $title = get_sub_field(‘title’);
    $subtext = get_sub_field(‘subtext’);
    $sellingpoint = get_field(‘sellingpoint’);

    @endphp

    <section class=”sellingpoint”>
    <div class=”container”>
    <div class=”row”>
    @if (have_rows(‘sellingpoint’))
    @while(have_rows(‘sellingpoint’)) @php (the_row());
    {!! $subtext !!}

    @endwhile

    @else test
    @endif
    </div>
    </div>
    </section>

  • const handleRemoveLocation = ( index ) => {
    const locations = [ …props.attributes.locations ];
    locations.splice( index, 1 );
    props.setAttributes( { locations } );
    };

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

You must be logged in to reply to this topic.