Just add:
'post_title' => $_POST['fields']['field_yourfieldnumber']
to your array.
For example:
$post = array(
'post_status' => 'publish' ,
'post_title' => $_POST['fields']['field_1'],
'post_type' => 'example' ,
);
I think everyone is just missing [‘fields’] before the field name.
Compliments to Aaron Ranger for his tutorial:
http://www.telegraphicsinc.com/2013/07/how-to-add-new-post-title-using-aacf_form/
The display format is only applicable when a user selects a date. If you want the date to format in the loop you will have to set the date like so:
<?php $date = new DateTime(get_field('fieldname'));
echo $date->format('n/j/Y'); ?>
Format the date accordingly: http://php.net/manual/en/function.date.php
I just ran into the same issue as truheart. However, I utilized WP_Query in my loop to call my custom post type. My code is similar to:
$args = array( 'post_type' => 'customposttype' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
In this case, I found the way to reset the post data was to run:
$loop->reset_postdata();
instead of wp_reset_postdata();
(due to the fact I have no global $post object defined).