Support

Account

Home Forums Front-end Issues How to show ACF Repeater in front end form Reply To: How to show ACF Repeater in front end form

  • @madhan2085
    Your template doesn’t look right!

    I’ve removed the script as I assume you’re not using ajax.
    Also, you don’t need the form declared in the loop
    Finally, you’re using a user ID as the post ID but not declaring the user ID:

    <?php
    /**
     * Template Name: Manage Products
     *
     * @package Listable
     * @since Listable 1.0
     */
    acf_form_head();
    
    get_header();
    
    global $post; ?>
    
    <div id="primary" class="content-area">
    	<main id="main" class="site-main" role="main">
    
    	<?php 
    	acf_form(array(
    		‘form’			=> true,
    		‘post_id’		=> ‘user_’ . $user_id, #where is this being declared?
    		‘field_groups’	=> array(‘field_57aad46f04ccc’),
    	));
    	?>
    
    	</main><!-- #main -->
    </div><!-- #primary -->
    
    <?php
    get_footer();

    If this is storing against a user, you also need to get the logged in user ID, maybe this might work for you:

    <?php
    /**
     * Template Name: Manage Products
     *
     * @package Listable
     * @since Listable 1.0
     */
    acf_form_head();
    
    get_header();
    
    global $post; 
    $user_id = get_current_user_id();
    ?>
    
    <div id="primary" class="content-area">
    	<main id="main" class="site-main" role="main">
    
    	<?php 
    	acf_form(array(
    		‘form’			=> true,
    		‘post_id’		=> ‘user_’ . $user_id, #where is this being declared?
    		‘field_groups’	=> array(‘field_57aad46f04ccc’),
    	));
    	?>
    
    	</main><!-- #main -->
    </div><!-- #primary -->
    
    <?php
    get_footer();