How to ensure form button doesn't transverses to next page until validation of the form are met?




I am creating a webform in which few fields have some validation which is getting validated through javascript on click of the form button. Validation happens , error messages pops up but webforms navigates to next page.

I have written below code on the button:

<input class="button submit_btn" id="input149329043626377" type="image" src="" value="Submit" data-nl-bindto="action" data-nl-transition="next" data-nl-action="next" />

What should be the attribute/code to be written to ensure, on click of button, it stays on the same page with error message in which all validations aren't satisfied?

Answers (0)