• Resolved Medienopfer98

    (@medienopfer98)


    I work for a agency, who use ninja forms and must create a plugin. I have this in my actions constructor

    add_filter('ninja_forms_submit_data', array( $this, 'validate_minimum_nl_selects' ));

    and this in the function

    $form_data['errors']['fields'][89] = esc_html__( 'Error', 'myplugin' );
    $form_data['errors']['fields'][91] = esc_html__( 'Error', 'myplugin' );
    $form_data['formErrorsCorrectErrors'] = esc_html__( 'Form Error', 'myplugin' );
    return $form_data;

    Problem is, that the error is only shown at field 89. If i comment the line with 89 then the error is shown at field 91. The formErrorsCorrectErrors is never working, but i also want an error at the end of the form. Is it possible to show the errors on each field and change the main error message for the form?

    I also have a problem that once a error is shown, i cant submit the form again. Hope somebody can help me, because i dont know where i should ask this question.

Viewing 1 replies (of 1 total)
  • Thread Starter Medienopfer98

    (@medienopfer98)

    I tested now both filters.

    1) ninja_forms_submit_data, which is called before send the data. The code is above.

    2) I also tried ninja_forms_pre_validate_field_settings and try to add [‘error’] to each of my fields. That causes also the same problem and the error message is missing.

Viewing 1 replies (of 1 total)
  • The topic ‘Validation and Submit Problems’ is closed to new replies.