0

I hava a front end form i want to have a preview button for the form. problem is acf form generates the post id after submitting the form. So can't add a preview link

get_preview_post_link this can be used to get the preview link but it requires a iD to passed..

How can i add a preview button? may be ajax save the post as draft? and allow option to publish in the new page?

  <?php

    acf_form(array(
        'post_id'         => 'new_post',
        'submit_value'    => __("Create", 'acf'),
        'return'          => '%post_url%',
        'updated_message' => __('added Successfully', 'acf'),
        'post_title'      => true,
        'post_content'    => false,
        'new_post'        => array(
            'post_type'   => 'l',
            'post_status' => 'publish',
        ),
    ));

    ?> 

Please help thanks

  • Possibly related ... [link]https://wordpress.stackexchange.com/questions/311564/front-end-form-to-create-a-custom-post-with-preview – Jamie_D Oct 28 '18 at 17:27
  • @Jamie_D yeah but that was not specific to acf ..i asked that question –  Oct 29 '18 at 01:44

0 Answers0