diff --git a/app/javascript/controllers/form_validation_controller.js b/app/javascript/controllers/form_validation_controller.js index 85e7bb86..862ca9f3 100644 --- a/app/javascript/controllers/form_validation_controller.js +++ b/app/javascript/controllers/form_validation_controller.js @@ -33,7 +33,7 @@ export default class extends Controller { if (this.element.reportValidity()) { this.element.classList.remove("was-validated"); - if (!this.element.hasAttribute("hx-post")) this.element.submit(); + if (!this.element.getAttributeNames().some(x => x.startsWith("hx-"))) this.element.submit(); window.dispatchEvent(new CustomEvent("notification:show", { detail: { id: this.submittingIdValue } })); } else {