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

[HELP] Named Span not working inside Label

1554245713

Edited 1554245964
Finderski
Pro
Sheet Author
Compendium Curator
Any reason why this wouldn't work: <label><input type="radio" class="sheet-select-radio sheet-fighting" name="attr_weaponskill" value="fighting" checked="true" /><span name='attr_fightingname'></span></label> ...and by doesn't work, I mean I can select the input, but the span is showing blank rather than the usual named span output of showing the value of the attribute... EDIT: This is inside a repeating section, but the named attribute is referencing an attribute that is not in the repeating section...I'm guessing this is the problem.  Is there a way to make this work?
1554246430

Edited 1554246472
vÍnce
Pro
Sheet Author
Might be a limitation that the named span will only work within the scope of the fieldset...  or vice versa. Don't know. ;-( Maybe try a readonly text input and style as needed.
1554247246
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The problem is that all attributes in a repeating section are attributes of that repeating item. so, what you actually have for that span is @{repeating_section_-Joiuadsf890u54lJoi9_fightingname} instead of @{fightingname}. You'll need to rename your repeating version to something else and then use a sheet worker to keep it up to date.
1554247332
vÍnce
Pro
Sheet Author
The span is inside the repeating section, but attribute is outside, right?
1554247583
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Right, but the named span is an attribute as well, so it creates a repeating attribute for it instead of referencing the non repeating version.
1554247938
vÍnce
Pro
Sheet Author
Ohhh.  I didn't realize it...  I just thought it was treated like a "placeholder" to display another attributes value.