any button even when explicitly mentioned as type="button" triggers form submission
I'm using the Form component inside the dialog component by shadcn/ui
I have a button inside the form which is explicitly mentioned as type="button" but still triggers form submisson.
This is the button inside the form:
and this is the actual submit button:
3 Replies
Just a sanity check: is the
<Button type="submit">
between the opening and closing tags of the form?yes it was
well it was a silly problem I wasnt checking the right page for the updates
Happens to all of us haha, I'm glad you figured it out!