Replies: 2 comments 4 replies
-
Can you try hx-trigger="blur consume"? |
Beta Was this translation helpful? Give feedback.
4 replies
-
Previously I needed to do the same and ended up using HTML classes and CSS selectors. Assigning a class to the input/textarea that I needed to send, e.g. class="input-control breq" and then define hx-include=".breq", that works like a charm. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've encountered a problem where I need to send only the input values located under the specified selector using
hx-post
, but unfortunately,HTMX
seems to be sending all inputs instead of just those under the selector.For instance, in the following code snippet, I intend to send only the values under the selector
closest div.container
, as specified in theb
input:In this scenario, the request is correctly sending only the values located under the
closest div.container
:However, when I attempt to use
hx-post
with theb
input, the request unexpectedly sends all input values:The resulting request body includes all input values, not just those under the specified selector:
Why is this happening? I only want to send the values under the selector even for
post
methods.Beta Was this translation helpful? Give feedback.
All reactions