Page 1 of 1

Form validation

Posted: Tue Jun 03, 2025 9:49 am
by barsyr
Hello,

I have a question about form-validation.
I've set a layout-grid to act as a 'form' (properties of layoutgrid > form > General > enable form').
In the settings of enabled form, field action is empty.
I've added an event 'onsubmit' in events of the lay-outgrid: javascript: this.action=Create_login();return true;
I have added validation (bootstrap) on all the fields.
So I was expecting, if I press the submit-button, first the form validation happens, and if failure, the 'onsubmit' event would not happen.
Like mentioned in https://wysiwygwebbuilder.com/forum/vie ... hp?t=98736
The validation happens, but also the script Create-login() is executed.
What am i doing wrong here ?

Regards
Bart

Re: Form validation

Posted: Tue Jun 03, 2025 10:21 am
by Pablo
Bootstrap validation is not executed via the onsubmit event attribute event. It's a separate script, so it does not take any custom event handling into account.

Re: Form validation

Posted: Tue Jun 03, 2025 2:12 pm
by barsyr
Ok, thanks for answering.
So do I understand correct that I need another validation then Bootstrap ?
Or how can this be achieved with WWB ?

Regards, Bart.

Re: Form validation

Posted: Tue Jun 03, 2025 3:27 pm
by Pablo
For the built-in scripts it's impossible to know if you implement custom code or how it affects the behavior of the page.
So, if you add custom code, then you will need to implement any workarounds yourself.

Re: Form validation

Posted: Tue Jun 03, 2025 4:17 pm
by barsyr
Hi,
Thanks for the response. It make sense. I'll get into it.
Regards Bart