Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open a new modal with the current modal form's results #234

Open
Sorath93 opened this issue Jan 10, 2024 · 0 comments
Open

Open a new modal with the current modal form's results #234

Sorath93 opened this issue Jan 10, 2024 · 0 comments

Comments

@Sorath93
Copy link

Sorath93 commented Jan 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant