• Dear all,

    I am setting up my first Ninja form and I want to create a condition in order to process the form only when a certain amount of questions are answered correctly, so I created the following in javascript:

    $J(‘#ninja_forms_form_9’).submit(function(e){
    if(amount of question is correct){
    }
    else{
    }
    e.preventDefault();
    return;
    })

    The good thins is that the data is not processed, but the submit button changes the submit text into processing and you cannot submit anymore.

    Therefore am I wondering, how can I solve my bug? Either by adding code so that the submit button changes back to normal again, or by changing my code so that the submit button does not change.

    I tried already return true/ false, or use break, but it all did not help.

    Thanks a lot!

    https://ww.wp.xz.cn/plugins/ninja-forms/

Viewing 1 replies (of 1 total)
  • Hello! Thanks for using Ninja Forms. You will need to use the hooks that the plugin provides. I suggest you to look through this list of hooks: Hooks. You might want to use the ninja_forms_process hook.

Viewing 1 replies (of 1 total)

The topic ‘Stop form from processing’ is closed to new replies.