Support » Plugin: Advanced Forms » Issue with af/form/editing/post_created

  • Resolved aterstriep


    I’m trying to update a custom field after a post is created by an AF form. My code is below:

    function form_post_created( $post, $form, $args ) {
    	// Update ACF Applicant PDF ID Field
    	$value = 12345;
    	update_field('applicant_pdf_id', $value, $post->ID);
    add_action( 'af/form/editing/post_created/key=form_5e456514eb719', 'form_post_created', 10, 3 );

    After the form is submitted, the post is created but the field isn’t updated. If it makes a difference, the post being created is a custom post type.

    What am I doing wrong?

    • This topic was modified 1 year ago by aterstriep.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Issue with af/form/editing/post_created’ is closed to new replies.