How to call Alpine function in hx-on::after-request ? #2375
Unanswered
GeorgeFlorian
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
@GeorgeFlorian You can use Alpine to listen to the HTMX event with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a form being submitted via a button:
I do the input validation using AlpineJS.
The issue is that I need to call the Alpine function
resetDelivery()after the form was successfully submitted and I can't find a way of doing it.I've added the following code to the form tag, then to the button and I only get
Uncaught ReferenceError: resetDelivery is not definedfrom thehx-on::after-request = "resetDelivery()"hx-on::after-request = "resetDelivery()" @submit="resetDelivery()" onsubmit="resetDelivery()"Beta Was this translation helpful? Give feedback.
All reactions