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

I have been looking this post for hours and I am still lost..

Jakob  Sheet Author   API Scripter Permalink  for 5690792 Quote   Report There's no need for sheet workers. Use the following; you still need the select  somewhere  to make the actual switch, of course. <input type="checkbox" name="attr_dropdown_option" value="1" class="sheet-hidden sheet-hider" checked> <div class="sheet-block-a">A</div> <input type="checkbox" name="attr_dropdown_option" value="2" class="sheet-hidden sheet-hider"> <div class="sheet-block-b">B</div> <input type="checkbox" name="attr_dropdown_option" value="3" class="sheet-hidden sheet-hider"> <div class="sheet-block-c">C</div> CSS .sheet-hidden { display: none; } .sheet-hider:not(:checked) + div { display: none; } I can not figure out how to set up the Switch for this.... ANY help?????
1701222342
GiGs
Pro
Sheet Author
API Scripter
Can't you just cipy those into yoiur HTML and CSS respectively? What exactly is the issue?
O yea They can be copied and pasted fine, but do nothing...but as Jacob said --"y ou still need the select  somewhere  to make the actual switch, of course" And I can not for the life of me get any Select to work.... I am missing something but no idea what it is
1701224325
GiGs
Pro
Sheet Author
API Scripter
whats the HTML for your select?
variations of  <select class="sheet-block-switch" name="attr_drowpdown_option">   <option value="1" >Option A</option>   <option value="2">Option B</option>   <option value="3">Option C</option> </select>
Tried messing with the sheet-hidden a bit too.... from CSS
1701233010
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
TranZdog said: variations of  <select class="sheet-block-switch" name="attr_drowpdown_option">   <option value="1" >Option A</option>   <option value="2">Option B</option>   <option value="3">Option C</option> </select> You've got a typo in the name of your select (dro w pdown instead of dropdown)
Scott C. said: You've got a typo in the name of your select (dro w pdown instead of dropdown) DUDE! you are my hero!!!! My old eyes did not see that!  Thank you. I need to stop using copy and paste when trouble shooting...
1701240689
GiGs
Pro
Sheet Author
API Scripter
I think you'll also need to correct either the class of the select, or the CSS. At the moment your CSS declaration is for class sheet-hider, and that isn't in your select.
1701243358
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
GiGs said: I think you'll also need to correct either the class of the select, or the CSS. At the moment your CSS declaration is for class sheet-hider, and that isn't in your select. sheet-hider is on the radios where it's supposed to be.