You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh that does look nice. For what it’s worth: I was not able to figure this out as a succinct alternative. Most suggestions on the internet are to either send a whole new form over the wire or to write more js than that. For example:
If you choose to reject this PR on the grounds that the above is sufficient, it might be worth calling that out in the docs somewhere as this seems like a common pattern. It was the very first dilemma I ran into when trying out HTMX.
I believe the majority use case would be to reset a form only after a successful request, therefore documenting the example as such might be beneficial.
I would've liked to have seen this as an example within the hx-on reference, or at least a link. Just spent some time coming to the same solution using the event.detail as mentioned above.
Originally posted by @jakespracher in #1636 (comment)
The text was updated successfully, but these errors were encountered: