Changes between Initial Version and Version 2 of Ticket #35647


Ignore:
Timestamp:
Jul 31, 2024, 10:37:19 AM (4 months ago)
Author:
Sarah Boyce
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35647 – Description

    initial v2  
    11I was Trying to integrate HTMX into my django application's frontend. and noticed a weird and what seems like a breaking issue.
    22Following is the html code that I have in my html file being rendered:
     3
     4{{{
    35<form
    46        hx-post="{% url 'batch_delete' pk=batch.id %}"
     
    1517                </button>
    1618        </form>
     19}}}
    1720Following is what is seen my inspecting Element in my Browser.
     21
     22{{{
    1823<form hx-post="/batches/22/delete/" hx-trigger="submit" hx-target="#batchesListCard" hx-swap="innerHTML" hx-on::before-request="$(this).closest('.modal').modal(hide)"></form>
    1924<input type="hidden" name="csrfmiddlewaretoken" value="csrf_value">
     
    2126    Yes
    2227</button>
    23 
     28}}}
    2429As you can see, the form is being auto-closed by the templating engine,
    2530The error however isnt in every form, It is happening to the form(with no user input) that is used with htmx to be used as a trigger.
Back to Top