Skip to content

does leptos support multiple submit button? #2136

Answered by gbj
kzhui125 asked this question in Q&A
Discussion options

You must be logged in to vote

As I said above, there is no such thing as a submit2 event so that will never fire. You should either use an on:click on that second button, or use on:submit on the form and check which element is the submitter with the submitter() method on SubmitEvent https://docs.rs/web-sys/latest/web_sys/struct.SubmitEvent.html#method.submitter

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

gbj Dec 27, 2023
Maintainer

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