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

Help with fieldsets and dynamically generated roll buttons

Hi, I am making a custom character sheet and have a question about if there is a way to pass the index of a fieldset into itself on creation. My html looks like this; <fieldset class="repeating_oaths"> <button name="invoke_oath" type="roll" value="&{template:OATH} {{name=@{name}}} {{oath=@{repeating_oaths_$0_coreoath}}} {{roll=[[ ?{Approach| Careful, 4DF+3| Forceful, 4DF-1| Quick, 4DF+1}]]}}"></button>  <input name="attr_coreoath" type="text" placeholder="Core Oaths"/>  </fieldset>  This points only at the first index of the repeating fields, how do I make it so it will reference itself? Sorry if this is simple, I looked through the Macro docs but couldn't see an example of this. Cheers
1550686995
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
When referencing repeating attributes from within the repeating item, you don't need the row I'd or the repeating prefix. Just put @{coreoath} instead.
Wow, that was easy. Works, thanks a bunch!