The modal closes because the whole page is reloaded with any validation errors. There is nothing you can do about this.
What you are looking for is javascript that re-opens the modal automatically if the page contains signup errors
I have a signup form built that pops up a Bootstrap 5 modal. simple setup no java just calling the modal to open using:
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalSignup">Sign-up</button>
for for is supposed to validate on the backend before storing in the database, the issue is, when I click on submit button the modal closes and I cant verify if the fields entered were good.
has anyone used BS5 modal on a submit form before and know how to verify and show errors before the modal closes ?
Please or to participate in this conversation.