i'm using django and HTMX on a modal that contain a form
when i click on the
"
<button type="submit" class="btn btn-primary">Submit</button>
"
it broke the modal and try to close it it doesn't close it properly
i think the problem is on plugins.bundle.js ( i'm not sure) and i couldn't ffind it
i want that when the button with type submit is clicked no thing happens
thank you by advance
i also tried it with a simple form inside a modal and it gives the same result
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#kt_modal_3">Launch demo modal</button>
<div class="modal fade" tabindex="-1" >
<form class="form" hx-get="/" >
<div class="modal-dialog">
<div class="modal-content position-absolute">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<!--begin::Close-->
<div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
<span class="svg-icon svg-icon-2x">...</span>
</div>
<!--end::Close-->
</div>
<div class="modal-body">
<p>Modal body text goes here.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</form>
</div>
and you can add htmx in the bottom of the document with JS scripts
<script src="https://unpkg.com/htmx.org@1.8.4"></script>
Hi,
Could you please paste your modal code here and we will verify it? You can use https://gist.github.com/ to pass your code.
Regards.