Support

Account

Home Forums General Issues Use Date/Time picker as post publication date Reply To: Use Date/Time picker as post publication date

  • I have an acf form page with the following code

    <?php
    /*
    Template Name: Featured
    */
    acf_form_head();
    get_header();?>
    
    <div id="container" class="row">
            <div id="primary" class="small-12 columns">
    		
              	<?php
    					 acf_form(array(
    						 'post_id' => 'new_post',
    						 'field_groups' => array(54), // Used ID of the field groups here.
    						 'post_title' => true, // This will show the title filed
    						 'post_content' => true, // This will show the content field
    						 'form' => true,
    						 'new_post' => array(
    							
    							 'post_status' => 'draft' // You may use other post statuses like draft, private etc.
    						 ),
    						 'return' => '%post_url%',
    						 'submit_value' => 'Review',
    					 ));
    			
    			?>
    
            </div><!-- #primary -->           
    	</div> <!-- #container -->
        
        <?php get_footer(); ?>
    

    This takes the user to a review page where the they can edit further if they wish.

    Can I then update the publication date within the code above?

    Also, the code for error testing – where would I put that?

    Thanks
    Patrick