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

Hiding the contents of a repeating section

1469232304

Edited 1469232427
David
Sheet Author
I have this code in a non repeating section <input type="checkbox" name="attr_showstrike-rank" checked="checked" style="display: none"> <div class="sheet-strike-rank"> <input style="width:35px" type="number" name="attr_Grapple_sr" /> </div> .charsheet div.sheet-strike-rank{ display: none; } .charsheet input.sheet-showstrike-rank:checked ~ div.sheet-strike-rank { display: inline; } I am trying to get this to work for a repeating section. <input type="checkbox" name="attr_showstrike-rank" checked="checked" style="display: none"> <fieldset> <table style="width: 100%;"> <tr> <td> <div class="sheet-strike-rank"> <input style="width:35px" type="number" name="attr_melee_sr" /> </div> </td> input.sheet-showstrike-rank:checked ~ .repcontainer[data-groupname=repeating_Hand-to-Hand] div.sheet-strike-rank { display: inline; } .charsheet div.sheet-strike-rank{     display: none;     } It based on code from the CCS Wizardry page 4  here do search for " div.repcontainer[data-groupname=repeating_my-fieldset-name]" Currently it just stays hidden.
1469248726
Lithl
Pro
Sheet Author
API Scripter
Did the forum eat some of your HTML? Because the fieldset in your post is not going to produce a repeating section named Hand-to-Hand.
1469255197
David
Sheet Author
No I truncated it because it wasn't needed
1469264872
David
Sheet Author
<fieldset> <table style="width: 100%;">   <tr>     <td><input type="checkbox" name="attr_Success" /></td>     <td><input style="width: 111px;" type="text" name="attr_Attack-Weapon" /></td>     <td >        <div class="sheet-strike-rank">             <input style="width:35px" type="number" name="attr_melee_sr" />       </div>    </td>    <td>    <select style="font-size: 9px; margin-bottom: 0px; width:49px" name="attr_length">           <option value="">S</option>           <option value="">M</option>          <option value="">M/L</option>         <option value="">L</option>        <option value="">ALL</option>    </select>   </td>  <td><input style="width:50px" type="number" name="attr_Score" /></td> <td>    <select style="font-size: 9px; margin-bottom: 0px; width:49px" name="attr_spcl">        <option value="Bl">Bl</option>        <option value="Im">Im</option>        <option value="Cr">Cr</option>        <option value="En">En</option>   </select> </td> <td><input style="width:60px" type="text" name="attr_Damagex" /></td> <td><input style="width:35px" type="number" name="attr_Attacks-Round" /></td> <td><input style="width:40px" type="text" name="attr_HP" /></td> <td><button type="roll" value="&{template:melee-roll} {{tot=[[@{Damagex}+@{Damage_Bonus}]]}} {{success=[[@{Score}+?{Mods|0}]]}} {{fumble=[[ceil(95+(@{Score}+?{Mods|0})/20))]]}} {{crit=[[ceil((@{Score}+?{Mods|0})/20)+1]]}} {{special=[[ceil((@{Score}+?{Mods|0})/5)+1]]}} {{skillvalue=@{Score}}} {{roll=[[1d100]]}} {{skillname=@{Attack-Weapon}}}" /></td> </tr> </table> </fieldset>
1469268114
Lithl
Pro
Sheet Author
API Scripter
What I mean is that the fieldset tag needs class="repeating_Hand-to-Hand"  if you want it to be a repeating section named "Hand-to-Hand".
1469271089

Edited 1469271241
David
Sheet Author
It does have for some reason if you try and paste anything with a class on it into this editor it strips the class <input type="checkbox"  class="sheet-showstrike-rank" name="attr_ball_bag"  value="1"  checked="checked" > <fieldset class="repeating_Hand-to-Hand"> <table style="width: 100%;"> <tr>   <td><input type="checkbox" name="attr_Success"  /></td>    <td><input style="width: 111px;" type="text" name="attr_Attack-Weapon" /></td>    <td> <div class="sheet-repeat-strike-rank"> <input style="width:35px" type="number" name="attr_melee_sr" /> </div>   </td> <td> <select style="font-size: 9px; margin-bottom: 0px; width:49px" name="attr_length"> <option value="">S</option> <option value="">M</option> <option value="">M/L</option> <option value="">L</option> <option value="">ALL</option> </select> </td>      <td><input style="width:50px" type="number" name="attr_Score" /></td>   <td> <select style="font-size: 9px; margin-bottom: 0px; width:49px" name="attr_spcl"> <option value="Bl">Bl</option> <option value="Im">Im</option> <option value="Cr">Cr</option> <option value="En">En</option> </select>   </td>   <td><input style="width:60px" type="text" name="attr_Damagex"  /></td>   <td><input style="width:35px" type="number" name="attr_Attacks-Round" /></td>   <td><input  style="width:40px" type="text" name="attr_HP" /></td>   <td><button type="roll" value="&{template:melee-roll} {{tot=[[@{Damagex}+@{Damage_Bonus}]]}} {{success=[[@{Score}+?{Mods|0}]]}} {{fumble=[[ceil(95+(@{Score}+?{Mods|0})/20))]]}} {{crit=[[ceil((@{Score}+?{Mods|0})/20)+1]]}} {{special=[[ceil((@{Score}+?{Mods|0})/5)+1]]}}  {{skillvalue=@{Score}}}  {{roll=[[1d100]]}} {{skillname=@{Attack-Weapon}}}" /></td>    </tr> </table> </fieldset> Hmmm create a code block and then paste seems to work
1469273785
David
Sheet Author
I got it working with some of your code from another place. <input type="checkbox" class="sheet-check-melee-toggle" name="attr_showstrike-rank" style="display: none" /> <fieldset class="repeating_melee"> <table> <tr> <td><input type="checkbox" name="attr_Success"  /></td> <td><input style="width: 111px;" type="text" name="attr_Attack-Weapon" /></td> <td><div class="sheet-melee-toggle"><input style="width:35px" type="number" name="attr_melee_sr" /></div></td> <td> <select style="font-size: 9px; margin-bottom: 0px; width:49px" name="attr_length"> <option value="">S</option> <option value="">M</option> <option value="">M/L</option> <option value="">L</option> <option value="">ALL</option> </select> </td>    <td><input style="width:50px" type="number" name="attr_Score" /></td> <td> <select style="font-size: 9px; margin-bottom: 0px; width:49px" name="attr_spcl"> <option value="Bl">Bl</option> <option value="Im">Im</option> <option value="Cr">Cr</option> <option value="En">En</option> </select> </td> <td><input style="width:60px" type="text" name="attr_Damagex"  /></td> <td><input style="width:35px" type="number" name="attr_Attacks-Round" /></td> <td><input  style="width:40px" type="text" name="attr_HP" /></td> <td><button type="roll" value="&{template:melee-roll} {{tot=[[@{Damagex}+@{Damage_Bonus}]]}} {{success=[[@{Score}+?{Mods|0}]]}} {{fumble=[[ceil(95+(@{Score}+?{Mods|0})/20))]]}} {{crit=[[ceil((@{Score}+?{Mods|0})/20)+1]]}} {{special=[[ceil((@{Score}+?{Mods|0})/5)+1]]}}  {{skillvalue=@{Score}}}  {{roll=[[1d100]]}} {{skillname=@{Attack-Weapon}}}" /></td>   </tr> </table> </fieldset> .sheet-melee-toggle { display: none; } .sheet-check-melee-toggle:checked ~ [data-groupname=repeating_melee] > .repitem .sheet-melee-toggle { display: inline; }