This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Sl-checkbox does not submit with form, whether checked or unchecked #744
Comments
I believe this is a duplicate of #732 and has been fixed in If this isn't a dup, feel free to comment and I'll reopen! |
Can confirm that checkboxes are not submitting their value even in beta.72 Here is an example Codepen |
I tested down to beta.52 and the bug already occurred back then. |
Hi togehter, don't you think that the I never saw a checkbox in a form without a Other thoughts? Was wondering - then none of our applications would have worked correctly for months. 🤣 |
I've verified that this is fixed in |
@claviska still doesn't work: {userState?.installations.map((installation, index) => (
<sl-checkbox
name={`i-${index}-${installation?.machineId}`}
value="xxxxxxxxxxxxxxxxxx"
>
{installation.name}
</sl-checkbox>
))} can you check? I get in the body: { "i-0-578484d8e14bda1c": "true", "i-1-578484d8e14bda1c": "true" } no value here, only |
@karolskolasinski We have tests to verify that form submission is working as intended, and no other reports of this. For submission to work, checkboxes must be checked and they must have a name. If https://codepen.io/claviska/pen/WNPzbEa?editors=1010 From what I can tell, everything is working as expected. The code above doesn't have enough information to determine if a problem exists in the library, so it could be something else causing unexpected results in your app. |
@claviska There is a problem in deno (Hono framework) using the htmx library. When I use: <sl-radio-group name="param">
{params.map((param) => <sl-radio value={param.param}>{param.param}</sl-radio>)}
</sl-radio-group> everything works fine, but if I use |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe the bug
Sl-checkbox and also sl-switch do not submit with their form, whether checked or unchecked. They are not part of the FormData object either. Submitting both traditionally and via fetch API does not work.
To Reproduce
Browser / OS
FF 100.0 on Windows 10
The text was updated successfully, but these errors were encountered: