I've created a few forms that open up a modal box when submitted. They all work fine whenever the submit button is clicked but if someone were to just press enter within an input box it doesn't work.
I've tried adding the modal options to the input boxes but that just opens the modal as soon as they're selected.
here's the html for one of my forms:
<form method="POST" id="new_group">{% csrf_token %}
<div class="form-group row justify-content-center">
<div class="col-10">
<input type="text" class="form-control border" id="name" name="name" placeholder="Name...">
</div>
<button type="button" id="new_btn" class="btn btn-viso" value="new_group" form="new_group" onclick="setSubmitValue('new_btn')" data-toggle="modal" data-target="#confirmationModal"><i class="far fa-save"></i></button>
</div>
</form>
Thanks!