busy-kangaroo-68336
01/10/2023, 11:42 PMmysterious-toddler-20573
01/10/2023, 11:42 PMbusy-kangaroo-68336
01/10/2023, 11:43 PMbusy-kangaroo-68336
01/10/2023, 11:43 PMmysterious-toddler-20573
01/10/2023, 11:43 PMbusy-kangaroo-68336
01/10/2023, 11:44 PMmysterious-toddler-20573
01/10/2023, 11:44 PMmysterious-toddler-20573
01/10/2023, 11:44 PMmysterious-toddler-20573
01/10/2023, 11:44 PMbusy-kangaroo-68336
01/10/2023, 11:45 PMmysterious-toddler-20573
01/10/2023, 11:45 PMjs:
prefixmysterious-toddler-20573
01/10/2023, 11:46 PMhx-get="js:foo(params)"
busy-kangaroo-68336
01/10/2023, 11:46 PMmysterious-toddler-20573
01/10/2023, 11:46 PMfoo()
busy-kangaroo-68336
01/10/2023, 11:46 PMbusy-kangaroo-68336
01/10/2023, 11:47 PMmysterious-toddler-20573
01/10/2023, 11:47 PMmysterious-toddler-20573
01/10/2023, 11:47 PMconfig
object that just contains all the metadata that htmx collects (effectively requestConfig
if you are looking at the code)busy-kangaroo-68336
01/10/2023, 11:48 PMbusy-kangaroo-68336
01/10/2023, 11:48 PMmysterious-toddler-20573
01/10/2023, 11:48 PMbusy-kangaroo-68336
01/10/2023, 11:49 PMbusy-kangaroo-68336
01/10/2023, 11:49 PMmysterious-toddler-20573
01/10/2023, 11:53 PMstatus
and response
properties directly w/ the results of the JS and invoking the xhr.onload()
method, not sure if possible but it would do the least violence to the normal code pathbusy-kangaroo-68336
01/10/2023, 11:55 PMlate-king-98305
01/11/2023, 12:13 AMvalue
attribute, if you specify it), but if it's not checked, it won't even be in the form data that's submitted. Given that caveat, though, you should be able to use an hx-post="/my/end/point"
attribute on the checkbox, and it should include its maybe-value in the request. (That's what the first sentence at https://htmx.org/docs/#parameters says; I haven't personally done a post on a single checkbox.)abundant-spring-38265
01/11/2023, 10:33 AMabundant-spring-38265
01/11/2023, 10:33 AMabundant-spring-38265
01/11/2023, 10:33 AMabundant-spring-38265
01/11/2023, 10:33 AM