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

Can someone help me display the value of an attribute in a label

Hi there, I am trying to do something relatively simple: I want when my player hoover their mouse on the name of the feat they have entered that it displays the feat description as a label. I have written the following code but it does not appear to work: <fieldset class="repeating_class">     <label title="@{repeating_class_desc}" disabled="True">     <input type="checkbox" name="attr_repeating_class_checkbox" class="repeating_class_checkbox" checked="unchecked" style="width:5%; margin-top:2px; margin-bottom:2px;">     <input type="text" name="attr_repeating_class_name" style="width:74%; margin-top:2px; margin-bottom:2px;">     <input type="text" name="attr_repeating_class_throw" style="width:15%; margin-top:2px; margin-bottom:2px;">     <div class="repeating_class_checkbox_content repeating_class_checkbox">         <input type="text" name="attr_repeating_class_desc" style="width:97%; height:auto; margin-top:2px; margin-bottom:2px;">     </div>     </label> </fieldset>
1537780654
GiGs
Pro
Sheet Author
API Scripter
I dont see anything there that would create hovertext. Also, label is for static values. if you want a value that updates automatically, a readonly input would be better. You might be able to do it with an embedded span inside the label and some funky CSS, but input is much easier. I'd suggest moving all your style commands off into CSS styles. Your attribute names are a bit long. When roll20 creates each attribute in a repeating fieldset, it makes it from three parts: the repeating fieldset's class an autogenerated ID code the specific attribute's code. And combines these three, so you get something like "repeating_set_CODE_attribute_name" Taking your repeating_class_Throw attribute, you'd end up with an attribute named repeating_class_CODE_repeating_class_throw I'd change the fieldset to "repeating_classes" (plural) and the individual names to "class_name" (singular, and remove the repeating part) Also, shouldnt they be called feats, not classes?
1537819515
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You might be able to glean something from the Shaped Sheet for 5e code. It uses that behavior to display spells: hover over the spell to see the info.
1537822603
Finderski
Pro
Sheet Author
Compendium Curator
One way is to use spans and give them the same name as the input... <input type="text" name="attr_something" value="Cool!" /> <span name="attr_something"></span> In that example, the span would display Cool! (or whatever the value is changed to).