Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow any sl-buttons to submit post requests #7

Open
benopotamus opened this issue Mar 16, 2024 · 0 comments
Open

Allow any sl-buttons to submit post requests #7

benopotamus opened this issue Mar 16, 2024 · 0 comments

Comments

@benopotamus
Copy link
Owner

benopotamus commented Mar 16, 2024

With the following code, if the user clicks the button, the form submits, because the button has a name and value attribute. See https://javascriptdev.info/how-to-make-an-html-button-perform-a-post-request/

<form action="" method="post">
    <button name="foo" value="upvote">Upvote</button>
</form>

This doesn't currently work with sl-buttons - only an sl-button with type='submit' will cause the form to submit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant