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

[Help] On demand radio button

So, have cannibalized several sheets in my time here, I've hit upon the idea of making a row of radio buttons (to track health).  The number of boxes are varied, from character to character, and I would love for only the correct number to be shown.  I am thinking if I can figure out how to get the right number to show using a number-box (like G.V. configuration menu), it would work prefectly. The idea is that if Sara, the Warrior-Affecting-Rose-Tattoos, has 9 health.  Each time she takes damage, she checks off one of those check boxes (or radio buttons).  James, the Delver-Under-Monkey-Mountain-Yeoman, has only 6 health, so only has six boxes showing. Any ideas?
1442627622
Lithl
Pro
Sheet Author
API Scripter
input[type=radio].sheet-healthbox:checked ~ input[type=radio].sheet-healthbox { display; none; } Might get you what you need. "Healing" with that would require using arrow keys, since you can't see the higher-level hit point boxes. In order to let you use the mouse for healing, you'd have to display the next-higher box. input[type=radio].sheet-healthbox:checked ~ input[type=radio].sheet-healthbox { display; none; } input[type=radio].sheet-healthbox:checked + input[type=radio].sheet-healthbox { display: inline; } Both of those snippets assume all of the health box radio inputs are siblings, and the second assumes there's absolutely nothing in between them. If you were, for example, styling the boxes with an empty span after each, you'd need something like this: input[type=radio].sheet-healthbox:checked + span + input[type=radio].sheet-healthbox { display: inline; }
I will give this a try this weekend.  Thanks!