some-hairdresser-28401
08/25/2022, 11:56 AMechoing-book-71490
08/25/2022, 12:15 PMmelodic-book-40892
08/25/2022, 2:14 PM<form autocomplete="off" hx-get="{% url 'listings:search' %}" hx-params="*" hx-target="#results-list" hx-select="#results-list"
hx-indicator="#results-list" hx-swap="outerHTML settle:1s" hx-trigger="change">
breezy-kilobyte-4067
08/25/2022, 2:43 PMhtmx:configRequest
as described here https://htmx.org/docs/#config_request_with_events to set a "Content-Type" and "X-CSRF-Token" header before the AJAX request is sent to the server. This event is firing and setting the headers correctly when page loaded initially, but it isn't firing subsequently when clicking on the "submit" button (for example) that is in the html that is returned from the server. Is there a recommended way to resolve this? Apologies if this is a basic question.mysterious-toddler-20573
08/25/2022, 6:21 PMmysterious-toddler-20573
08/25/2022, 6:21 PMmysterious-toddler-20573
08/25/2022, 6:21 PMbreezy-kilobyte-4067
08/25/2022, 7:02 PMbreezy-kilobyte-4067
08/25/2022, 7:11 PMmysterious-toddler-20573
08/25/2022, 7:11 PMbreezy-kilobyte-4067
08/25/2022, 7:33 PMbreezy-kilobyte-4067
08/25/2022, 8:12 PMPROBLEM
where I think there's an issue.mysterious-toddler-20573
08/25/2022, 8:14 PMmysterious-toddler-20573
08/25/2022, 8:14 PMbreezy-kilobyte-4067
08/25/2022, 8:14 PMmysterious-toddler-20573
08/25/2022, 8:14 PMbreezy-kilobyte-4067
08/25/2022, 8:15 PMbreezy-kilobyte-4067
08/25/2022, 8:32 PMaction
html attribute is set and/or maybe some other attribute or hidden input generated by the Rails form helper. Either way it is overriding/superceding the htmx request. I believe this because I manually created the form html without using the Rails form helpers and it worked.
I would like to use the standard Rails form helpers, but I might have to build a custom one. Are there any suggestions on the best approach?breezy-kilobyte-4067
08/25/2022, 8:33 PMaction
html attribute in the Rails form helper, but I wasn't.mysterious-toddler-20573
08/25/2022, 8:40 PMmysterious-toddler-20573
08/25/2022, 8:40 PMbreezy-kilobyte-4067
08/25/2022, 8:45 PMbreezy-kilobyte-4067
08/25/2022, 8:46 PMgreen-flower-49070
08/25/2022, 8:56 PMsquare-manchester-95442
08/25/2022, 9:34 PMsquare-manchester-95442
08/25/2022, 9:35 PMmysterious-toddler-20573
08/25/2022, 9:49 PMsquare-manchester-95442
08/25/2022, 9:55 PMmysterious-toddler-20573
08/26/2022, 11:14 PMmysterious-toddler-20573
08/26/2022, 11:46 PM