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

Input and Span field not showing value in SPAN

Okay, So I have been trying to do this using sheetworkers, and it kept saying it didn't have an attribute for the Name.  Fine, so I went back to basics and did it in the HTML with this. <b class="sheet-center"><span name="attr_combat_style_dmg_bonus" value="attr_combat_style_dmg_bonus" disabled/></b> <input class="sheet-inputfield sheet-center" name="attr_combat_style_dmg_bonus" value="@{combat_style_points}/@{combat_style_dmg_bonus_cost}" type="number" hidden disabled /> I have tried changing the value expression to "floor(@{combat_style_points}/@{combat_style_dmg_bonus_cost})" as well. But on the character sheet it just displays the code from my INPUT Value. I've also made the B/span line just SPAN. It always just looks like this.  Other work... why not this one???
1661316779

Edited 1661316940
vÍnce
Pro
Sheet Author
AFAIK, named spans only need the attribute name.  ie <span name="attr_foo"></span> also, for hidden you can either use type="hidden" (I believe that doing so assumes that type is a number) or class="hidden" and you may need to put parenthesis around your calculated input value.  If this is hidden, you probably don't need disabled (which was probably the issue you were experiencing with sheetworkers)
vÍnce Ermergerrd Sheetworkers can't read disabled input fields???? See, little pieces of information like that are so useful to have. It worked early in the script, and now it doesn't? The names are the same! WTF??? Well, turns out one field is disabled and one is not. Okay, thank you!
1661375549

Edited 1661375661
vÍnce
Pro
Sheet Author
Agreed Michael...&nbsp; Lots of info in the wiki, but it can be difficult to eek out these little gems. <a href="https://wiki.roll20.net/Sheetworker_examples_for_Non-programmers#Autocalc_Fields_and_Sheet_Workers" rel="nofollow">https://wiki.roll20.net/Sheetworker_examples_for_Non-programmers#Autocalc_Fields_and_Sheet_Workers</a> btw: GiGs has an awesome blog on sheet building. I highly recommend reading through everything posted. <a href="https://cybersphere.me/" rel="nofollow">https://cybersphere.me/</a>