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 .
×

Single button to open only a portion of fieldset section?

Is it possible to have a single button hide only a portion of multiple repeating fields at once?  Imagine D&D 3.5 skills box, lots of skills and each have a handful of stats inputs.  So to save space we make each skill a repeating field that players only use as needed, and then if they want to adjust stats they hit one button that opens up all of the stat inputs at once.  It doesn't seem that a check button can target anything beyond the fieldset tag so I can't hide only a portion.  Is there a work around?  Or perhaps a better way to approach this idea entirely?
1644446025

Edited 1644446109
vÍnce
Pro
Sheet Author
Hi Tim, you can style repeating sections like other sections, but you need to include the repeating section in your selectors ie ( .repcontainer[data-groupname="repeating_skills"] ) Simple example to hide/show something within a repeating section from outside; input[type="checkbox"]:checked.toggle ~ .repcontainer[data-groupname="repeating_skills"] .toggle-view {     display: none; } <h1>Skills</h1> <span>Hide/Show: </span> <input class="toggle" type="checkbox" name="attr_toggle_skills" value="1" /> <fieldset class="repeating_skills"> <label>Skill: <input type="text" name="attr_skill_name" value="" placeholder="skill..."/></label> <label>Ranks: <input type="text" name="attr_skill_ranks" value="0" /></label> <label class="toggle-view">Description: <input type="text" name="attr_skill_desc" value="" placeholder="info..." /></label> </fieldset> Obviously your class selector "path" will vary depending on your html. You can also use hidden checkboxes (copies of the original checkbox) to toggle areas throughout the sheet as well.
Thank you!  I figured there may be some different selector to use.  This has happened a few other times to me.  I'm new to all of this so I may have just missed it due to info overload. Is there a list somewhere on the wiki that mentions all of the times we have to use a not so obvious selector?  P.s.  the code you gave me isn't working exactly as intended.  Just for learning purposes would you mind explaining what is causing the hide/show button to delete the added field?  (if checked it also adds all but the field you intended to hide) 
1644456065
vÍnce
Pro
Sheet Author
It can be info overload on the wiki: ;-) <a href="https://wiki.roll20.net/Character_Sheet_Development/CSS#Repeating_Sections" rel="nofollow">https://wiki.roll20.net/Character_Sheet_Development/CSS#Repeating_Sections</a> The example above should only hide or show the description in all repeating skills.
Figures! It was in one of ten tabs I already have open on the wiki.&nbsp; It would probably help if I focused on one thing at a time.&nbsp; Trying to build a char sheet as my first go at html and css is frying my brain lol.&nbsp; Thank you so much for your help!&nbsp; :)
1644476794
vÍnce
Pro
Sheet Author
Enjoy the ride Tim. ;-)
1644501848

Edited 1644501888
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Welcome to sheet building Tim! You might enjoy my sheet building guide series that just started, A sheet Author's Journey .