Support

Account

Home Forums Front-end Issues Redirecting front end form to newly created post

Unread

Redirecting front end form to newly created post

  • As per the documentation, I have the return set to %post_url% and it does not redirect to the new post. Instead it remains on the same page, just blank.

    Here is the page template code where the form is generated:

    <?php
    if ( ! ( is_user_logged_in() || current_user_can('publish_posts') ) ) {
        echo '<p>You must be a registered author to post.</p>';
    } else {
         acf_form(array(
             'post_id' => 'new_post',
             'field_groups' => array(177),
             'post_title' => false, 
             'post_content' => false,
             'form' => true,
             'new_post' => array(
                 //'post_type' => 'posts',
                 'post_status' => 'publish'
             ),
             'return' => '%post_url%',
             'submit_value' => 'Submit Content',
         ));
    }
    ?>
    

    Is something else required in the function that processes the form?

    Thanks.

Viewing 1 post (of 1 total)

The topic ‘Redirecting front end form to newly created post’ is closed to new replies.