Skip to content

Trigger Form Action using v2 Confirm Modal #1921

Answered by Sarenor
TentCityTech asked this question in Q&A
Discussion options

You must be logged in to vote

Well, you're triggering the form with the constant id "form". Try this:

<form id="form{id}" method="POST" action="?/deleteThing">
    <input name="id" type="hidden" value={id} />
</form>

And doing document.getElementByID('form'+id).

If it's not necessary that it's a form handler you could just use fetch and a delete request as well.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Sarenor
Comment options

Answer selected by TentCityTech
@TentCityTech
Comment options

@Sarenor
Comment options

Comment options

You must be logged in to vote
1 reply
@Sarenor
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants