django-formset
django-formset copied to clipboard
Event listener for add sibling button
I use HTMX in formset form with siblings. When I press add sibling button formset adds sibling but HTMX doesn't know about DOM changes. There's a procedure in HTMX which could add new content to HTMX DOM but I have to start this procedure after formset siblings was added. Could you help me with any idea how to do it? It would be great to have an event listener in formset to start adding sibling and end adding sibling. Or maybe you have another way?
Can you please point me on the specific page of the HTMX documentation.
Btw. I would really appreciate, if you could add an example using HTMX to the testapp/-folder. This would help me in adding the necessary hooks so that these two libraries can work together.
https://htmx.org/api/#process
You can see htmx samples on HTMX site. https://htmx.org/examples/ It works fine with your formset java but now I have a problem with new sibling.
Did you have a chanse to look at HTMX ?