refined-waiter-90422
04/06/2022, 4:25 PMhx-trigger to listen for it. But yeah, dunno, might be a better way.mysterious-toddler-20573
04/06/2022, 4:31 PMrefined-waiter-90422
04/06/2022, 4:32 PMrefined-waiter-90422
04/06/2022, 4:32 PMrefined-waiter-90422
04/06/2022, 4:33 PMeager-lighter-51415
04/06/2022, 4:43 PMrefined-waiter-90422
04/06/2022, 4:45 PMhx-trigger to the event you actually want? πjolly-kite-167
04/06/2022, 5:08 PMwitty-scooter-77245
04/06/2022, 5:12 PMhx-post, and hx-target targets a status div inside the form.
When a user logs in but no user account exists, the returned HTML contains a second submit button which allows the user to sign up instead.
This is valid HTML and perfectly safe (https://stackoverflow.com/questions/547821/two-submit-buttons-in-one-form), but clicking on the new button prints htmx:targetError error to the console.
The full stack trace is below. One possibility is that hooking up the new button properly involves re-initializing not just the new content but the entire form, and perhaps this runs into an edge case inside of HTMX. This is just a guess and could very well be wrong; any thoughts would be very much appreciated!
htmx:targetError
logError @ htmx.js:1785
triggerEvent @ htmx.js:1802
triggerErrorEvent @ htmx.js:1757
issueAjaxRequest @ htmx.js:2500
eventListener @ htmx.js:1300refined-waiter-90422
04/06/2022, 5:15 PMjolly-kite-167
04/06/2022, 5:16 PMrefined-waiter-90422
04/06/2022, 5:17 PMjolly-kite-167
04/06/2022, 5:18 PMrefined-waiter-90422
04/06/2022, 5:19 PMrefined-waiter-90422
04/06/2022, 5:20 PMwitty-scooter-77245
04/06/2022, 5:23 PMjolly-kite-167
04/06/2022, 5:31 PMrefined-waiter-90422
04/06/2022, 5:34 PMjolly-kite-167
04/06/2022, 6:17 PMcareful-potato-89071
04/07/2022, 9:38 AMcareful-potato-89071
04/07/2022, 9:39 AMcareful-potato-89071
04/07/2022, 9:39 AMcareful-potato-89071
04/07/2022, 10:03 AM<a href="/contact/2" hx-get="/contact/2" hx-push-url="/contact/2">Name</a> ? Without a href and the href being the same value, the link wont appear as a proper link with preview, without the push url it wont fix the address par. for the replacement, you kinda want all 3bland-coat-6833
04/07/2022, 11:04 AMbland-coat-6833
04/07/2022, 11:05 AMcareful-potato-89071
04/07/2022, 11:50 AMcareful-potato-89071
04/07/2022, 12:07 PMhx-boost not work the same on form? <form method="POST" action="/contact/<?=$id?>" hx-target="#content" hx-boost="true"> doesnt do the url-push thingbland-coat-6833
04/07/2022, 12:15 PMcareful-potato-89071
04/07/2022, 12:16 PMcareful-potato-89071
04/07/2022, 12:18 PM