Support

Account

Home Forums Front-end Issues After frontend submission via acf_form() I see a blank page

Solved

After frontend submission via acf_form() I see a blank page

  • After submission from the frontend I see a blank page. See the code below and I am not sure If I configured anything wrong. https://nftdirectory.nftplazas.com/submit-talent/

    
    <?php 
    
    /* Template Name: Talent Submission */ 
    
    ?>
    
    <?php acf_form_head();?>
    
    <?php get_header(); ?>
    
    <div id="content" class="site-main page-data-submission" role="main">
        
        <h1><?php echo the_title(); ?></h1>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php acf_form(array(
        'post_id'       => 'new_post',
        'post_title' => true,
        'post_content' => false,
        'new_post'      => array(
            'post_type'     => 'talent',
            'post_status'   => 'draft'
        ),
        'submit_value'  => 'Submit',
        'return' => "www.google.com",// return url
        'updated_message' => __("Thank you for submission. We will review and publish it soon.", 'acf')
    )); ?>
    <?php endwhile; ?>
    </div><!-- #content -->
    
    <?php get_footer(); ?>
    
  • Try adding acf_form_head() within your first php block of code. The white space between the block is probably breaking the redirect.

    Like this:

    <?php 
    /* Template Name: Talent Submission */ 
    
    acf_form_head();
    get_header();
    ?>
  • Thank you I was able to fix this.

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

You must be logged in to reply to this topic.