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

2 repeating action in one fieldset

  so what im trying to do is have it so u can add melee weapon  to the sheet by hitting add   and then inside each melee weapon there an upgrade  area for then to add some effect to the melee  weapon but that would be have 2 repeating fieldset  and one inside the other so 1st off is that even possiable to do as i really only have a basic understand of html. the code start out with        <fieldset class="repeating_meleeweapons">  then i get to the upgrade part and i looked on the CSS wizardly and this is out my brain think it should work but that not the case and im really at a lost as how to fix it                   <tr>  <td colspan="2" class="sheet-statlabel" name="meleeupgradability" style="width: 140px;">Upgrades</td>                  </tr> <fieldset class="repeating_upgrade" style="display: none;"> <!-- my-repeating-section HTML --> </fieldset> <div class="repcontainer" data-groupname="repeating_my-repeating-section">     <div class="repitem">         <div class="itemcontrol">             <button class="btn btn-danger pictos repcontrol_del">#</button>             <a class="btn repcontrol_move">≡</a>         </div> <tr>                 <td colspan="2"><input class="sheet-inputbox" type="text" name="attr_meleeupgradability" placeholder="Upgrade" style="height: 24px; width: 140px;"></td>                 <td colspan="2"><input class="sheet-inputbox" type="text" name="attr_meleeupgrade_1" placeholder="Effect 1" style="height: 24px; width: 70px;"></td>                 <td colspan="2"><input class="sheet-inputbox" type="text" name="attr_meleeupgrade_2" placeholder="Effect 2" style="height: 24px; width: 70px;"></td>                 <td colspan="2"><input class="sheet-inputbox" type="text" name="attr_meleeupgrade_3" placeholder="Effect 3" style="height: 24px; width: 70px;"></td>                 <td colspan="2"><input class="sheet-inputbox" type="text" name="attr_meleeupgrade_4" placeholder="Effect 4" style="height: 24px; width: 70px;"></td>                 </tr> <!-- my-repeating-section HTML -->     </div>     <!-- there will be a div.repitem for each item the user has actually added to the sheet --> </div> <div class="repcontrol" name="repeating_upgrade">                                <button class="btn repcontrol_add">+Add</button> <button class="btn repcontrol_edit">Modify</button> </table>    </div>         </fieldset>
1553210398

Edited 1553210970
vÍnce
Pro
Sheet Author
You won't be able to nest repeating fieldsets. ;-(
fair enough
1553210975
vÍnce
Pro
Sheet Author
I believe you will either need to add-in a number of blank "upgrade" attributes, or link two repeating sections(repeating_weapons, repeating_upgrades) using sheetworkers.  repeating_weapons could pull it's upgrade-related attributes from repeating_upgrades. There are much smarter people on here that could probably give an example of how that might work.
1553213417

Edited 1553213444
GiGs
Pro
Sheet Author
API Scripter
It looks like you are constructing your repeating section incorrectly, and are maybe confused about how you use css. That's normal - it still confuses me sometimes! You have several copies of things like this: <td colspan="2"><input class="sheet-inputbox" type="text" name="attr_meleeupgrade_2" placeholder="Effect 2" style="height: 24px; width: 70px;"></td> You should move that style information off into the css. I'd suggest changing the class name to something description, like class="sheet-meleeupgrades" As Vince says, you can nest one repeating section inside another, but in your code you don't do that. I'm not sure what exactly you are doing with this: <fieldset class="repeating_upgrade" style="display: none;"> <!-- my-repeating-section HTML --> </fieldset> <div class="repcontainer" data-groupname="repeating_my-repeating-section"> I don't think you should have a data-groupname in your code. Those codes I think are part of how roll20 manages repeating sections, but they are created by roll20 at runtime - not by us users. You dont add the repitem and add/modify buttons to your code - roll20 does that. I dont have enough information about what you are trying to do, to suggest an alternative approach.
1553230684

Edited 1553230933
ya there alot of think im not really understand on HTML and CSS but  i been trying to pick it up as for  the copy thing i pick up working on this sheet for a friend of mine and  been slowly trying to figure out things so might be a lil over my head but i do like a challenge.  i think u given me a couple of idea on how  to rework something too thanks  as for the datagroup thing i seen it on  the CSS Wizardry wiki and was trying to figure out what it mean but never really could figure out what it was doing nor could i make it function
1553230883
GiGs
Pro
Sheet Author
API Scripter
Can you post what you have inside this section? <fieldset class="repeating_upgrade" style="display: none;"> <!-- my-repeating-section HTML --> </fieldset>
1553231043

Edited 1553231271
i try puting the upgrade and 4 effect code in there but didnt work so was stuck as to how to make it function, but i think what i need to do is alot of reworking the code  
1553231237
GiGs
Pro
Sheet Author
API Scripter
I wanted to see the full code for that section, to maybe see if I could think of some code improvement suggestions.
<a href="https://wiki.roll20.net/CSS_Wizardry#Styling_Repeating_Sections" rel="nofollow">https://wiki.roll20.net/CSS_Wizardry#Styling_Repeating_Sections</a>
1553231937

Edited 1553232071
GiGs
Pro
Sheet Author
API Scripter
Aha, I see what's causing the confusion. Notice that section says: After writing the code for your repeating section, here is how it will look&nbsp; when rendered to the user : And then shows the code section. That's not showing you the code you write - it's showing the code that appears in the character sheet, after being processed by roll20. It's showing you that to help you understand how to create CSS to target it. You dont write code like that. So ignore all this code: &lt; fieldset class = "repeating_my-repeating-section" style = "display: none;" &gt; &lt; ! - - my - repeating - section HTML - - &gt; &lt; /fieldset &gt; &lt; div class = "repcontainer" data - groupname = "repeating_my-repeating-section" &gt; &lt; div class = "repitem" &gt; &lt; div class = "itemcontrol" &gt; &lt; button class = "btn btn-danger pictos repcontrol_del" &gt; #&lt;/button&gt; &lt; a class = "btn repcontrol_move" &gt; ≡ &lt; /a &gt; &lt; /div &gt; &lt; ! - - my - repeating - section HTML - - &gt; &lt; /div &gt; &lt; ! - - there will be a div.repitem for each item the user has actually added to the sheet - - &gt; &lt; /div &gt; &lt; div class = "repcontrol" data - groupname = "repeating_my-repeating-section" &gt; &lt; button class = "btn repcontrol_edit" &gt; Modify &lt; /button &gt; &lt; button class = "btn repcontrol_add" &gt; + Add &lt; /button &gt; &lt; /div &gt; You just write this code: &lt; fieldset class = "repeating_my-repeating-section" style = "display: none;" &gt; &lt; ! - - my - repeating - section HTML - - &gt; &lt; /fieldset &gt; and replace this bit with your own code to build the repeating section: &lt; ! - - my - repeating - section HTML - - &gt; Everything else in that example will be created by roll20 later.
ya i get that now i was just trying to put that in and see how i could have made it work but&nbsp; again still trying to figure this out a bit and sometime things click and sometime they dont i have an idea but it jsut mostly going to be trial and error
1553232326
GiGs
Pro
Sheet Author
API Scripter
That's how most of us started :) You'll get there, with a bit of patience. Don't hesitate to ask for help with specific problems.