upvote
Unless there's a material change to the form, why not just update the changed parts?

I'd also question architectural decisions if you need to send 100kb+ of html down the wire for a partial.

reply
Thats not on htmx to decide what html to resend that's your engineering work...
reply
Why are you expected to send down the whole thing? Maybe I’m missing something, but when you send the request from the form the response is just a partial of the results on the right hand side, using hx-target to specify some div instead of replacing the form. Form just stays there?
reply
To sync the form state based on the current selections in the form. This is often called facets. The form contained many options and as you filtered those options would change. So you need a way to update the form too. Hence, compute the full thing on the server (the form state, the options within the fields, and the results) then send it all back.
reply
Except you don't. Use hx-vals, hx-include, or even hx-headers to pull in additional data into the request that's outside of the immediate form/component.
reply