Support

Account

Home Forums Add-ons Repeater Field Front-End Submission for Repeater-Field

Helping

Front-End Submission for Repeater-Field

  • Hello guys,

    I am trying to use acf_form for my repeater field.

    <div class="schedule" itemprop="openingHours">
       <h2>Video(s)</h2>
       <?php
                // check if the repeater field has rows of data
                if (have_rows('videos')):
    ?>
       <div class="control-group">
          <!-- <label class="control-label">Founders</label> -->
          <div class="controls">
             <table>
                <?php
                    // loop through the rows of data
                    while (have_rows('videos')):
                        the_row();
                        // display a sub field value
    ?>
                <tr>
                   <td><?php the_sub_field('video_url'); ?> </td>
                </tr>
                <?php
                    endwhile; ?>
             </table>
          </div>
       </div>
       <?php
                endif; ?>
                        <!-- Start Contribution -->
    <div class="btn edit-form" style="margin-top: 15px; ">Contribute</div>
    <div class="form-off"><?php 
    acf_form(array(
            'fields' => array('videos',
                               ),
        )); ?></div>
        <!-- END Contribution -->   
    </div>
    

    My problem is that my content does not get submitted to the post.

    Any suggestions what I am doing wrong?

    I appreciate your replies!

  • I tried now the following:

            acf_form(array(
            'form' => false,
            'field_groups' => array('videos'),
            'fields' => array('video_url'),
        )); ?>

    However, I get no repeater front-end field back, cause I just can edit 1 field. See below how my frontend looks like:

    Repeater Field

    Any suggestions?

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

The topic ‘Front-End Submission for Repeater-Field’ is closed to new replies.