blue-gold-89534
12/15/2022, 10:33 AMjs
document.querySelectorAll('id=form');.forEach(elem => { elem.setAttribute("style", "display:block;") });
should work I guess (but I am a js noob)blue-gold-89534
12/15/2022, 10:34 AMblue-gold-89534
12/15/2022, 10:35 AMfreezing-controller-74032
12/15/2022, 10:36 AMbrave-dog-98297
12/15/2022, 11:08 AMbrave-dog-98297
12/15/2022, 11:09 AMbitter-monkey-50309
12/15/2022, 12:13 PMHX-Swap-Error: true? An example use case is when a user submits a form that fails validation I want to return the HTML of the form with the inline validation errors (including keeping the submitted values) but also use the 400 status code to make it clear in logs that it's failed validation. Adding it as a header means by backend can be responsible for determining whether it's able to return an error suitable for the target or not (no full page error dumped into a div intended for a partial.
Currently I've got an event listener on beforeSwap that checks if the status is >= 400 and there's a custom response header to swap the error then it sets shouldSwap=true and isError=false. Be nice to bake that in IMO.boundless-vase-80440
12/15/2022, 12:21 PMripe-ghost-5606
12/15/2022, 12:25 PMbitter-monkey-50309
12/15/2022, 12:42 PMblue-gold-89534
12/15/2022, 4:00 PMevery interval be reduced by factor 10?
html
<div hx-get="/latest_updates" hx-trigger="every 0.1s">
Nothing Yet!
</div>
like this?mysterious-toddler-20573
12/15/2022, 4:05 PMms as an endingmysterious-toddler-20573
12/15/2022, 4:05 PMechoing-action-55459
12/15/2022, 9:05 PMhx-post through an attribute? Or do I have to make it a form to pass data?mysterious-toddler-20573
12/15/2022, 9:35 PMmammoth-family-48524
12/15/2022, 9:54 PMmammoth-family-48524
12/15/2022, 9:56 PMlate-king-98305
12/15/2022, 10:13 PMmammoth-family-48524
12/15/2022, 11:09 PMjolly-motorcycle-88169
12/16/2022, 5:44 AMjolly-motorcycle-88169
12/16/2022, 8:41 AMabundant-spring-38265
12/16/2022, 1:25 PMabundant-spring-38265
12/16/2022, 1:26 PMabundant-spring-38265
12/16/2022, 1:26 PMabundant-spring-38265
12/16/2022, 1:30 PM<select class="form-select form-select-sm" name="device_id" hx-get="https://virtserver.swaggerhub.com/paulo882/TestRunner/1.0.0/device"
hx-select="#device_list">
<option selected disabled>Select Device</option>
<option name="device_list"></option>
</select>abundant-spring-38265
12/16/2022, 1:31 PMripe-action-67367
12/16/2022, 1:47 PMabundant-spring-38265
12/16/2022, 1:48 PM