Support

Account

Home Forums Front-end Issues Issue of adding ACF to an existing form Reply To: Issue of adding ACF to an existing form

  • The existing frontend form is for the members to submit a new post in website. As the post is about is discount or coupon details, I wanna use ACF to add few more fields to the existing form, which are deals start date, end date and coupon code.

    Do you mean the existing form may not allow ACF to function well?

    Didn’t know if this information useful, I tried to add a field of tag by ACF in the function.php, and it works. Does it mean ACF is able to function in the form?

    
    $submission_data = array(
    'id'			=> $post_id,
    'title'         	=> $title,
    'source'        	=> $source,
    'ref_link'        	=> $ref_link,
    'description'   	=> $description,
    'category_id'   	=> $categories,
    'tags'          	=> $_POST['acf']['field_6023f52f7b6f0'],
    'list_voting'       => $list_voting,
    'list_submission'	=> $list_submission,
    'author'		=> $author_id,
    'status'		=> $status,
    );
    
    do_action( 'snax_handle_'. $format .'_submission', $submission_data, $request );