Empty the form and close modal

Rather quiet around the forum lately, so re-read this thread …

Not sure about within Blocs but with vanilla Bootstrap, a button inside a modal:

<button type="reset" data-bs-dismiss="modal" class="btn btn-secondary">Reset & Close</button>

Two key aspects:
Reset: type="reset"
Close: data-bs-dismiss="modal"

No extra JS needed, if thats all you wan’t and if it can be done in Blocs.

1 Like