1

I have a frontend acf form which is generating a new custom post.

When I submit the form on a desktop it works fine. It creates the post and redirects to the new post.

However when I use it on a mobile device, tested on Chrome, Firefox and Safari. The form creates the new post but doesn't redirect to the URL. Instead the spinning wheel gets stuck spinning and the page doesn't redirect anywhere.

The code I'm using is;

<!--ACF Frontend form-->
                <?php 

                     acf_form(array(
                         'post_id' => 'new_post',
                         'field_groups' => array(220), // Used ID of the field groups here.
                         'post_title' => false, // This will show the title filed
                         'post_content' => false, // This will show the content field
                         'form' => true,
                         'new_post' => array(
                             'post_type' => 'setup',
                             'post_status' => 'publish',
                         ),
                         'return' => '%post_url%',
                         'submit_value' => 'Submit Setup',
                     ));

                 ?>
Richard S
  • 11
  • 1
  • Are you logged in on mobile as well? Is it creating the post on "setup" as "publish" or "draft"? – caiovisk Feb 07 '20 at 01:48
  • The form is available to create posts even when not logged in. I confirmed this is working by creating a post while logged out on a desktop and it worked and "published" the post and redirected. Then on mobile it creates the post, but doesn't redirect to it. – Richard S Feb 09 '20 at 18:14

0 Answers0