Form validation in onSubmit (UI Kit v2)

Is there a way to prevent my Form from UI Kit V2 from emptying inside the onSubmit function? I tried using a return false but the form still empties itself. I need to check for a condition inside the form’s onSubmit function, if that conditions fails, a message is shown, all of that works, but the form is empty now :frowning:

Hey @DomingoLupo,
As far as I can tell, there is not a way to prevent onSubmit clearing your form fields. Could you use the onChange() function that is part of your field(s) to read and validate the condition before the data is submitted?

1 Like