{"type":"rich","version":"1.0","provider_name":"Transistor","provider_url":"https://transistor.fm","author_name":"hx-pod","title":"Large table pattern using htmx","html":"<iframe width=\"100%\" height=\"180\" frameborder=\"no\" scrolling=\"no\" seamless src=\"https://share.transistor.fm/e/42065a43\"></iframe>","width":"100%","height":180,"duration":1144,"description":"Mentioned, how to submit and reset a form on success using htmx:<form hx-post=\"/admin/candidates\"\t\t\t\t\t\t\t\t           hx-target=\"#candidates_add_form\"\t\t\t\t\t\t\t\t           hx-swap=\"beforebegin\"\t\t\t\t\t\t\t\t           hx-on::after-request=\" if(event.detail.successful) this.reset()\"\t\t\t\t\t\t\t  >This assumes the last row is the add form, and places the newly added item directly above it.","thumbnail_url":"https://img.transistorcdn.com/HDMx2j8NsKr2kaFUaB8csw69snTIab1k7QGpslBA4_0/rs:fill:0:0:1/w:400/h:400/q:60/mb:500000/aHR0cHM6Ly9pbWct/dXBsb2FkLXByb2R1/Y3Rpb24udHJhbnNp/c3Rvci5mbS85YzY0/NTY5OTExYjljY2Ri/MTFlZjk3NDhlZWE0/ODUxOC5qcGc.webp","thumbnail_width":300,"thumbnail_height":300}