Home › Forums › ACF PRO › new_post on acf_form not working after v4 -> v5 › Reply To: new_post on acf_form not working after v4 -> v5
That was the problem indeed, it turns out. The ID of the field was changed, I think, when I upgraded.
Still trying to figure out why the new_post isn’t working in this installation. I’m using the exact code on both sites for creating a new post, but no luck on later one. I’m guessing it’s something I haven’t found in my own work though, so I’ll keep looking. Thanks Elliot!
$newapp = array ( 'post_id' => 'new_post', 'new_post' => array( 'post_type' => 'appointment', 'post_status' => 'publish', 'post_title' => 'tempslug', ), 'field_groups' => array('414'), 'form_attributes' => array ( 'id' => 'new-app-form', ), 'submit_value' => 'Post Appointment', 'update_message' => false, 'return' => add_query_arg(array('adminTab'=>'apps', 'sub-tab'=>'available', 'appcreated'=>true), get_the_permalink()), ); acf_form($newapp);
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!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN— Advanced Custom Fields (@wp_acf) March 2, 2023
© 2023 Advanced Custom Fields.