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

"repeating_" behaving weird

1466466982

Edited 1466467229
Hi, So this is my first go at messing with the character sheet. I'm attempting to create a simple sheet for a game my brother and I want to play. The game has a notion of "attack dice" and "defense dice", so I was reading the wiki and figured the repeating sections would probably be good for this (though I can just as easily make them number fields, I still want to get the repeating bit working).&nbsp; So basically the issue is this. When I go to the character sheet in game, I experience two issues, which are reproducible as follows: 1. Click [+Add] button 2. Click [+Add] button again 3. Change second select to different option 4. Problem: first select disappears completely 1. Add several options 2. Click [Modify] 3. Delete first option 4. Problem: All options disappear completely. So, I'm not sure if this is a bug, if I'm doing something wrong, or what. But here's my html bit. Editor kept messing up the html, so pasted it here: <a href="http://pastebin.com/R7fpQhWT" rel="nofollow">http://pastebin.com/R7fpQhWT</a>
1466483469
vÍnce
Pro
Sheet Author
Normal behavior for repeating sections/rows. &nbsp;You need to do "something" to a repeating section/row in order for it to "exist (system assigned data-reprowid)" &nbsp;Removing the extra repeating rows is probably a way for the system to "clean house" before assigning an ID.&nbsp;
I'm not sure what you mean by "do something" with those sections, unless you mean simply to change the values - but then what's the point of having a default value? I understood it as simply populating a list of values for the character. I could then (hopefully) later use the js api (which I haven't looked into yet) to grab a list of these values, and do something with them. I don't suppose you know where there's an example of the repeating bit that works properly that I can look at for reference?
1466534831
Lithl
Pro
Sheet Author
API Scripter
As Vice says, no attributes for the repeating section row are saved until you change something, and when the sheet's display updates &nbsp;it will get rid of all rows that aren't backed by saved attributes.
1466572329

Edited 1466572360
vÍnce
Pro
Sheet Author
Andrew M. said: I'm not sure what you mean by "do something" with those sections, unless you mean simply to change the values - but then what's the point of having a default value? I understood it as simply populating a list of values for the character. I could then (hopefully) later use the js api (which I haven't looked into yet) to grab a list of these values, and do something with them. I don't suppose you know where there's an example of the repeating bit that works properly that I can look at for reference? Grab the html for any sheet and have a look at the code between &lt;fieldset&gt;&lt;/fieldset&gt;. <a href="https://wiki.roll20.net/Building_Character_Sheets#Repeating_Sections" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Repeating_Sections</a>