Checkbox value | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Checkbox value

which difference makes the value in the input type = "checkbox"?

18th May 2017, 8:15 PM
Cubensis
Cubensis - avatar
2 Answers
+ 6
When submitting forms "name=value" pairs are only sent for checked checkboxes. Since names can be duplicated (unlike IDs) this can effectively yield an array/list when checking multiple checkboxes using the same name.
13th May 2017, 1:43 AM
Kirk Schafer
Kirk Schafer - avatar
+ 6
By the way, in the meantime I added a live sample submit/response and went ahead and included checkboxes: https://code.sololearn.com/wubNMMMp8mYA/?ref=app
18th May 2017, 8:34 PM
Kirk Schafer
Kirk Schafer - avatar