htmx will work as expect if there is only one row. However, if there are more rows, htmx will send all the params (3 param in this case) when only a single link is clicked.
My work-around is to wrap a TD tag between the FORM tag like this:
I have read about hx-params here https://htmx.org/docs/#parameters and here https://htmx.org/attributes/hx-params/ to try to find how to make hx-params limit to get only parameter that's belong to current TD. In other words, how do I limit the hx-param scope to current elelemnt or parent element only?
This is my table template. If I have 3 data items then I have three rows. `
htmx will work as expect if there is only one row. However, if there are more rows, htmx will send all the params (3 param in this case) when only a single link is clicked.
My work-around is to wrap a TD tag between the FORM tag like this:
I have read about hx-params here https://htmx.org/docs/#parameters and here https://htmx.org/attributes/hx-params/ to try to find how to make hx-params limit to get only parameter that's belong to current TD. In other words, how do I limit the hx-param scope to current elelemnt or parent element only?
Is there any scoping parameter feature similar to scoping variable by @hype as mentioned here https://hyperscript.org/docs/#variables_and_scope
Is there away to make hx-params target the element by ID or read value assignment directly? Something like this:
You can use hx-vals to accomplish this:
https://htmx.org/attributes/hx-vals/