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

Questions about repeating fieldsets in character sheets

I am currently trying to create a custom character sheet and am struggling with fieldsets. I want to do a sheet for 7th Sea 1st edition. You have skills there that each contain several knacks. So I tried nested fieldsets like so: <fieldset class="repeating_skills"> <input type="text" name="attr_skillname" /> <fieldset class="repeating_knacks"> <input type="text" name="attr_knackname" /> <input type="number" name="attr_knachvalue" /> <select name="attr_attribute" class="dtype"> <option value="Muskeln">Muskeln</option> <option value="Geschick">Geschick</option> <option value="Verstand">Verstand</option> <option value="Entschlossenheit">Entschlossenheit</option> <option value="Panache">Panache</option> </select> </fieldset> </fieldset> I now am wondering about two things: 1. The values seem to be stored, but I don't see them on the attributes & abilites tab in the character. Why is this the case? 2. I would like to add buttons to actually roll the check. However, since I don't know what the real attribute name will be, I don't know how to reference the knack value correctly. I just started using Roll20, so it is quite possible that my question is stupid or already answered - but I didn't find a good solution for this. Also: hello to all of you, I hope to some day play a round with you!
1590574615
GiGs
Pro
Sheet Author
API Scripter
You should ignore the Attributes list on that tab. It's a legacy feature and not fully compatible with the character sheet feature. Attributes from repeating sections never show up there, nor do autocalc attributes, hidden attributes, or those that have a default value and havent been raised from it. On to your main problem: Fieldsets cannot be nested unfortunately. It would be very handy if they could be, but they cant. For your second question, if the roll button is inside the fieldset, you dont have to use the fieldset name or row id. Roll20 will add them uatomatically when you trigger the roll. Here's a very simple example. <fieldset class="repeating_example">     <input name="attr_stat> value="2" />     <button type="roll" name="roll_example" value="/roll 1d20+@{stat}"></button> </fieldset> If you want to access the button or stat from outside  the repeating section, you'd need to supply the section name and row id, but in this kind of case, neither is needed. As a safety precaution, make sure you dont have any attribute names inside the fieldset that are duplicated outside. If you have an attribute named "stat" inside the section, make sure there are no other attributes named "stat" anywhere else.
1590575396

Edited 1590575467
Andreas J.
Forum Champion
Sheet Author
Translator
Edit: ninja'd by GiGs 1. Repeating section attributes just don't show up there, but they still exist. Nothing to do about it. 2. buttons in repeating section can call values inside the section as if they where normal, so in the above case, a roll button would reference @{knackname} @{knackvalue} etc. Note: I'm not sure nested fieldsets (repeating sections) work. Look at the documentation for more info and links to examples: <a href="https://wiki.roll20.net/BCS" rel="nofollow">https://wiki.roll20.net/BCS</a>
1590575502
GiGs
Pro
Sheet Author
API Scripter
Andreas J. said: Note: I'm not sure nested fieldsets (repeating sections) work. They don't. The topic has come up before, and i am pretty sure there is a suggestion in the suggestion forum about it that I've voted for.
1590575829
Andreas J.
Forum Champion
Sheet Author
Translator
Yeah, was remembering something like that, but imma about to head out so didn't want to bother double-checking this. We should update the documentation if this isn't mentioned.
Cool, thank you for your help! I didn't find a mention that nesting of fieldsets does not work in the docs.&nbsp; Using @{knackvalue} works, but I don't get to work the attribute part: I want to roll a ([knackvalue]+[attribute])d10k[attribute]!! roll. The name of the attribute is selected with the dropdown as "attr_attribute" - the attribute itself is defined outside of the fieldset. I tried&nbsp; &lt;button type="roll" name="roll_example" value="/roll (@{knackvalue}+@{@{attribute}})d10k@{@{attribute}}!!"&gt;&lt;/button&gt; but this does not work.&nbsp; These errors show up in chat: No attribute was found for @{Schlägertrupp (TR: 2)|@{attribute} TypeError: Cannot read property 'substring' of undefined Do you have another hint for me?
1590584712
GiGs
Pro
Sheet Author
API Scripter
This isnt valid syntax: @{@{attribute}} Because of roll20's Order of Operations, you can never built an attribute call from parts or references like this.&nbsp; You can put the full attribute call in the select &nbsp;&nbsp;&nbsp;&nbsp;&lt;select name="attr_attribute" class="dtype"&gt; &lt;option value="@{Muskeln}"&gt;Muskeln&lt;/option&gt; &lt;option value="@{Geschick}"&gt;Geschick&lt;/option&gt; &lt;/select&gt; and then just use @{attribute} to get it. I wouldnt recommend using attribute &nbsp;as an actual attribute name though - pick something a but more descriptive of its role here.
Thank you! Using @{Muskeln} as value works - it also works when the base attribute changes, thank you very much! BTW: I am sticking with "attribute" as the name for now, because it is the associated attribute for this roll.
1590587474
GiGs
Pro
Sheet Author
API Scripter
you're welcome :)