Home Forums Front-end Issues acf_form() validation and feedback Reply To: acf_form() validation and feedback

  • Yeah, ‘ I’ve ma ed a mistake with that example code. It should be

    'post_type'   	 => 'post',
     post_status'   => 'publish'

    I think I solved my problem with using:

    wp_redirect(add_query_arg( 'error', 'true', get_permalink($submit_page_id)));

    in the _action_ssd_acf_submit_post_pre_save function in the following hook:

    add_action( 'acf/pre_save_post', '_action_ssd_acf_submit_post_pre_save', 1 );

    This way I don’t use the return of the acf_form() function and redirect to the same page with the form but the parameters in the URL which I can get to show the error notice on that page.

    Don’t know if this is the right way though.