Skip to content

Checkbox submissions appear as "on" whether checked or not #265

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

Closed
adamscot92 opened this issue Jul 30, 2018 · 4 comments
Closed

Checkbox submissions appear as "on" whether checked or not #265

adamscot92 opened this issue Jul 30, 2018 · 4 comments

Comments

@adamscot92
Copy link

When the user checks just one of the below inputs

| <input type="checkbox" name="heather-zagros" class="fab-check" id="heather-zagros"/>   | <input type="checkbox" name="cream-zagros" class="fab-check" id="cream-zagros"/>   | <input type="checkbox" name="grey-zagros" class="fab-check" id="grey-zagros"/>

All inputs come through as "on"

@mckennapsean
Copy link
Collaborator

did you try searching for your issue? because I did.

#192

this is how form submission works in HTML I believe, you have to group checkboxes together if you don't want them to come in separately. it's possible the data sent is different when using our JS than when not (native POST), in which case that is a bug.

@mckennapsean
Copy link
Collaborator

also we have a demo to show what grouping checkbox fields is like if that helps!
https://dwyl.github.io/learn-to-send-email-via-google-script-html-no-server/test.html

@mckennapsean
Copy link
Collaborator

@adamscot92 - did that explanation about checkboxes make sense? were you able to use that or the examples to solve your issue? thanks!

@mckennapsean
Copy link
Collaborator

Feel free to reopen if this is unclear or how to go about doing this, but it sounds like the original issue just needs to wrap the checkboxes together into a fieldset to only send the correct ones as on or off. Hope that helps!

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

2 participants