mysterious-toddler-20573
12/25/2022, 4:42 PMtall-dinner-62086
12/25/2022, 7:27 PMmysterious-toddler-20573
12/25/2022, 7:36 PMmammoth-family-48524
12/25/2022, 10:24 PMmysterious-toddler-20573
12/25/2022, 11:43 PMadventurous-ocean-93733
12/26/2022, 7:36 AMmysterious-toddler-20573
12/26/2022, 11:41 AMmysterious-toddler-20573
12/26/2022, 11:41 AMboundless-vase-80440
12/26/2022, 2:37 PMmysterious-toddler-20573
12/26/2022, 4:49 PMmysterious-toddler-20573
12/26/2022, 7:06 PMmysterious-toddler-20573
12/26/2022, 7:06 PMmysterious-toddler-20573
12/26/2022, 7:09 PMadventurous-ocean-93733
12/26/2022, 8:16 PMboundless-vase-80440
12/26/2022, 8:46 PMgorgeous-airport-54386
12/26/2022, 9:23 PMmysterious-toddler-20573
12/26/2022, 9:23 PMgorgeous-airport-54386
12/26/2022, 9:28 PMcool-match-83608
12/27/2022, 6:28 AMcool-match-83608
12/27/2022, 6:35 AMcool-match-83608
12/27/2022, 9:24 AMadamant-queen-9985
12/27/2022, 1:54 PMhtml
<li data-hx-post="post-endpoint" data-hx-trigger="click" name="elem">somepath</li>
from the [docs](https://htmx.org/docs/#parameters) I'd say that url-enconde parameters will be sent as "elem=somepath". The backend is prepare for this and if I lunch a simple curl
bash
curl 'http://localhost:3000/post-endpoint' -X 'POST' --data-urlencode "elem=somepath"
It works perfectly. But If I click on the list element the POST request is sent, but it is unable to parse the parameters. I am fairly new to web programming, so at this point I don't know If I am misunderstanding htmx, or my backend is broken or both at the same time... (probably the last one).
Any help would be appreciate šmysterious-toddler-20573
12/27/2022, 9:33 PMstocky-school-57923
12/28/2022, 7:51 PMadventurous-ocean-93733
12/28/2022, 7:59 PMfrom:
modifier on a trigger.
Maybe someone can post a better example but from the hypermedia.systems guide:
> regardless of what element has focus, we will take advantage of event bubbling and a feature that the hx-trigger attribute supports: the ability to listen to other elements for events.
So, something like this:
hx-trigger="click from:#yourformāstocky-school-57923
12/28/2022, 8:05 PMadventurous-ocean-93733
12/28/2022, 8:06 PMstocky-school-57923
12/28/2022, 8:08 PMadventurous-ocean-93733
12/28/2022, 8:13 PMclass=āupdatefieldā
. Eg
hx-trigger="click from:.updatefieldā
Havenāt tested this.adventurous-ocean-93733
12/28/2022, 8:20 PMchange
on the select inputs so:
hx-trigger="change from:.updatefieldā