Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Input type checkbox, value?

Hi, I tried to search for this topic but fell short, so here goes: I'm putting together a custom character sheet for our campaign, and I hit a rough spot with the input[type=checkbox]: When it is off, attribute value is 0, and when it is on, the attribute value is "on" (without quotes). Why is that? I could almost understand values off/on, that's consistent. I wished for values 0/1 to be able to use it easily in macros (eg "/r d6+@{hadBreakfast}*6 for damage"). What is the reasoning behind the valuepair 0/on? Is there a reason it's not 0/1? Am I missing something? Anyways, cool feature this character sheet stuff. Loving it so far :)
Do <input type='checkbox' value='1' /> Then when it is unchecked the value will be 0, when it is checked the value will be 1.
Gah, of course! Thanks! /em checks w3schools next time :D