Home › Forums › Front-end Issues › To create a link to edit a front form? › Reply To: To create a link to edit a front form?
<?php /* Template Name: Form Edit */ acf_form_head(); get_header(); the_post(); ?> <div class="acfform"> <?php $post_id = $_GET['post_id']; // get post_id option $options = array( 'post_id'=> $post_id, ); acf_form($options); ?> <?php if ( is_user_logged_in() ) : ?> <?php /* The loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php acf_form(array( 'field_groups' => array(xxxxxxxxxxx), 'post_id' => $post_id, 'post_title' => false, 'return' => '%post_url%', 'submit_value' => 'Atualizar Anuncio' )); ?> <?php endwhile; ?> <?php endif; ?> </div>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.