Replies: 3 comments 1 reply
-
|
Use the |
Beta Was this translation helpful? Give feedback.
-
|
My advice: https://dev.to/yawaramin/handling-form-errors-in-htmx-3ncg |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the responses. I was afraid I needed to do some configuration -- I found similar pointers on the Internet before I asked the question. Because of that I have since moved on. As a side note -- a browser normally renders the server response regardless of the status code. If htmx is meant for progressive enhancement, then why does it, by default, do something other than what the browser does? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a view that handles boosted form submissions. If it receives a htmx-boosted request, it responds with headers set to
{"HX-Push-URL": "false", "HX-Retarget": "this", "HX-Reswap": "outerHTML show:unset"}. That works great and the returned partial correctly replaces the form as long as the response status is 200 OK. But if it's 400 Bad Request, then nothing happens. What do?Beta Was this translation helpful? Give feedback.
All reactions