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
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.