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

Repeating fields nested in repeating fields

I have two lines on my sheet, which work fine.  But I'm getting odd behavior from the nested repeating field.  Code follows, but try not to judge, I've been patching all over trying to figure it out   <div>     <div class="weapongridline1">       <label class='weaponbox1name'>Weapon</label>       <label class='weaponbox1skill'>Skill</label>       <label class='weaponbox1attackthreshold'>Thresh</label>       <label class='weaponbox1attackroll'>Roll</label>       <label class='weaponbox1damage'>Damage</label>       <label class='weaponbox1damageroll'>Roll</label>     </div>     <fieldset class="repeating_weapon">       <div>         <div class="weapongridline1">           <input class="weaponbox1name" type="text" name="attr_weapon_name" value="">           <select class='weaponbox1skill' name='attr_weapon_skill'>             <option value='Unarmed' selected='selected'>Unarmed</option>             <option value='Archery'>Archery</option>             <option value='Axes'>Axes</option>             <option value='Block'>Block</option>             <option value='Crossbows'>Crossbows</option>             <option value='Dodge'>Dodge</option>             <option value='Small Blades'>Small Blades</option>             <option value='Spears'>Spears</option>             <option value='Swords'>Swords</option>           </select>           <input class="weaponbox1attackthreshold" type="text" name="attr_weapon_attackthresh" value="">           <button class='weaponbox1attackroll' type='roll'             value='&{template:skillRoll} {{name=@{avatar_name}}} {{skillvalue=@{}}} {{success=[[ceil(@{})]]}} {{roll=[[1d100]]}} {{skillname={attr_weapon_attack}}}}'             name='attr_weapon_attack_roll'></button>           <input class="weaponbox1damage" type="text" name="attr_weapon_damage" value="">           <button class='weaponbox1damageroll' type='roll'             value='&{template:skillRoll} {{name=@{avatar_name}}} {{skillvalue=@{}}} {{success=[[ceil(@{})]]}} {{roll=[[1d100]]}} {{skillname={attr_weapon_attack}}}}'             name='attr_weapon_damage_roll'></button>         </div>         <div class="weapongridline2">           <label class='weaponbox2indent'> </label>           <label class='weaponbox2size'>Size</label>           <label class='weaponbox2level'>Level</label>           <label class='weaponbox2rarity'>Rarity</label>           <label class='weaponbox2slots'>Slots</label>         </div>         <div class="weapongridline2">           <label class='weaponbox2indent'> </label>           <select class='weaponbox2size' name='attr_weapon_size'>               <option value='Small'>Small</option>               <option value='Standard' selected='selected'>Standard</option>               <option value='Large'>Large</option>           </select>           <select class='weaponbox2level' name='attr_weapon_level'>               <option value='L1' selected='selected'>L1</option>               <option value='L2'>L2</option>               <option value='L3'>L3</option>               <option value='L4'>L4</option>               <option value='L5'>L5</option>           </select>           <select class='weaponbox2rarity' name='attr_weapon_rarity'>               <option value='Common' selected='selected'>Common</option>               <option value='Uncommon'>Uncommon</option>               <option value='Rare'>Rare</option>               <option value='Legendary'>Legendary</option>               <option value='Epic'>Epic</option>               <option value='Ancient'>Ancient</option>           </select>           <input class="weaponbox2slots" type="text" name="attr_weapon_slots" value="">       </div>       <fieldset class="repeating_weapon_slot">       <div class="weapongridline3">         <label class='weaponbox3indent'> </label>         <label class='weaponbox3runestone'>Runestone</label>         <label class='weaponbox3rarity'>RS Rarity</label>         <label class='weaponbox3effect'>RS Effect</label><label class='weaponbox3damage'>RS Damage</label>       </div>         <fieldset class="repeating_weaponslot">           <div class="weapongridline3">             <label class='weaponbox3indent'> </label>             <input class="weaponbox3runestone" type="text" name="attr_weaponslot_runestone" value="">             <select class='weaponbox3rarity' name='attr_weaponslot_rarity'>                 <option value='Common' selected='selected'>Common</option>                 <option value='Uncommon'>Uncommon</option>                 <option value='Rare'>Rare</option>                 <option value='Legendary'>Legendary</option>                 <option value='Epic'>Epic</option>                 <option value='Ancient'>Ancient</option>             </select>             <input class="weaponbox3effect" type="text" name="attr_weaponslot_effect" value="">             <input class="weaponbox3damage" type="text" name="attr_weaponslot_damage" value="">           </div>           </fieldset>       </div>     </div> .charsheet .repcontainer[data-groupname="repeating_weapon_stats"] > .repitem {     display: inline-block; } .charsheet .repcontainer[data-groupname="repeating_weapon_slot"] > .repitem {     display: inline-block; } .weapongridline1 {     display: grid; /*    grid-template-columns: repeat(21,25px); */     grid-template-columns: 150px  100px  50px  50px  100px  50px ;     font-size: 12px;     column-gap: 3px;     margin: 0;     align-items: center; } .weapongridline2 {     display: grid; /*    grid-template-columns: repeat(21,25px); */     grid-template-columns: 50px 125px  50px  125px  50px  125px;     font-size: 12px;     column-gap: 3px;     align-items: center; } .weapongridline3 {     display: grid; /*    grid-template-columns: repeat(21,25px); */     grid-template-columns: 50px 100px  125px  150px  100px;     font-size: 12px;     column-gap: 3px;     align-items: center; } .weaponbox1name { grid-column: 1 ; width: 100%;  margin: 0;}                                .weaponbox1skill { grid-column: 2; width: 100%;  margin: 0;}                                .weaponbox1attackthreshold { grid-column: 3; width: 100%;  margin: 0;}                                .weaponbox1attackroll { grid-column: 4; width: 100%;  margin: 0;}                                .weaponbox1damage { grid-column: 5; width: 100%;  margin: 0;}                                .weaponbox1damageroll { grid-column: 6; width: 100%;  margin: 0;}                                            .weaponbox2indent { grid-column: 1; width: 100%; }                                .weaponbox2size { grid-column: 2; width: 100%; }                                .weaponbox2level { grid-column: 3; width: 100%; }                                .weaponbox2rarity { grid-column: 4; width: 100%; }                                .weaponbox2slots { grid-column: 5; width: 100%; }        .weaponbox3indent { grid-column: 1; width: 100%; }                                .weaponbox3runestone { grid-column: 2; width: 100%; }                                .weaponbox3rarity { grid-column: 3; width: 100%; }                                .weaponbox3effect { grid-column: 4; width: 100%; }                                .weaponbox3damage { grid-column: 5; width: 100%; }                                .weaponbox3notes { grid-column: 6; width: 100%; } In the end .... it should look like...                                REPEAT 1 Weapon Skill Thresh Roll Damage Roll      Size Level Rarity Slots      REPEAT 2      Runestone RS Rarity RS Effect RS Damage      /REPEAT 2 /REPEAT 1 Even better if I could make there be enough 'runestone' rows as = slots Thanks in advance!
Here's what I see.  I can't delete runestone rows, I can't type anything in them (closes automatically).
1675316453
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You can't nest repeating sections. Additionally, repeating section names cannot have underscores in them.
1675330721
GiGs
Pro
Sheet Author
API Scripter
Scott C. said: You can't nest repeating sections. Additionally, repeating section names cannot have underscores in them. Just to be clear, Scott means you cant have underscores after the first one. repeating_weaponslot is okay, repeating_weapon_slot is not. Scott is correct (as always!) - the repeating_ part is not really part of the name (it's a prefix to tell Roll20 this is a repeating section name), but that's a subtlety that's easy to miss.
1675332374
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thats an important distinction that GiGs makes. Thanks for clarifying the statement GiGs. Also, I don't know about always correct.