-
Notifications
You must be signed in to change notification settings - Fork 140
Description
It seems that there is no support for the Submit button in the form's modal to also use the Bootstrap5 attributes like data-bs-target.
I.e. I want to be able to toggle between modals (https://getbootstrap.com/docs/5.3/components/modal/#toggle-between-modals) but also have form validation occur due to "type='submit'" being set on the button.
For example, in my project I currently have a button like this:
<button type="submit" class="btn btn-primary">Generate</button>
I want this button to open a new modal with the results being displayed, therefore, I tried this:
<button type="submit" class="btn btn-primary" data-bs-target="#exampleModalToggle2" data-bs-toggle="modal">Generate</button>
However, if the form is invalid then exampleModalToggle2 still loads after I VERY breifly see the front-end error messages (the ones with the yellow "!" icon).
My view inherits from BSModalFormView and the form inherits form BSModalForm