Add error to form (after submit) programmatically?
-
Hi,
In v2.9.7 I used following to add error to form (during ninja_forms_preprocess hook)
add_action('ninja_forms_pre_process', 'dpcontent_pre_process_ninja_form'); function dpcontent_pre_process_ninja_form() { global $ninja_forms_processing; $ninja_forms_processing->add_error(1, 'Error submitting your enquiry');
How do add error to a form after submission in NF v3?
I currently have:
// NF3 Form processing: add_action( 'ninja_forms_after_submission', 'dpcontent_ninja_forms_after_submission' ); function dpcontent_ninja_forms_after_submission($form_data) { // Form processing settings $form_processing_id = $form_data['form_id']; $form = Ninja_Forms()->form($form_processing_id); // Error in processing, how to add error to form? (no add_error(id, msg) method on NF_Form type) ...
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add error to form (after submit) programmatically?’ is closed to new replies.