Support

Account

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);