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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Possible bug with span displaying attribute value

1460154491
vÍnce
Pro
Sheet Author
This came up in another&nbsp; thread . &nbsp;Not sure if this is intended, but when using span to display an attribute's value ( <a href="https://wiki.roll20.net/Building_Character_Sheets#Creating_Fields" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Creating_Fields</a> ), if the span is placed after the attribute you want to display, the span changes the attribute's value to null for chat output and possibly for other attribute calculations as well (haven't tested that). test case: <a href="https://app.roll20dev.net/join/37987/gN-h9A" rel="nofollow">https://app.roll20dev.net/join/37987/gN-h9A</a> sample code: &lt;h3&gt;Span is after inputs (input value becomes null)&lt;/h3&gt; &lt;fieldset class="repeating_spanLast"&gt; &lt;button type="roll" name="roll_test" value="Test=@{test} Foo=@{foo}"&gt;&lt;/button&gt; &lt;div&gt; Test: &lt;select name="attr_test"&gt; &lt;option value="1" selected&gt;1&lt;/option&gt; &lt;option value="2"&gt;2&lt;/option&gt; &lt;option value="3"&gt;3&lt;/option&gt; &lt;/select&gt; &lt;br&gt; Foo:&lt;input type="number" name="attr_foo" value="100" disabled /&gt; &lt;br&gt; Span showing test:&lt;span name="attr_test"&gt;&lt;/span&gt;&lt;br&gt; Span showing foo:&lt;span name="attr_foo"&gt;&lt;/span&gt;&lt;br&gt; &lt;/div&gt; &lt;hr&gt; &lt;/fieldset&gt; &lt;h3&gt;Span is before inputs (input value is retained)&lt;/h3&gt; &lt;fieldset class="repeating_spanFirst"&gt; &lt;button type="roll" name="roll_test2" value="Test=@{test2} Foo=@{foo2}"&gt;&lt;/button&gt; &lt;div&gt; Span showing test2:&lt;span name="attr_test2"&gt;&lt;/span&gt;&lt;br&gt; Span showing foo2:&lt;span name="attr_foo2"&gt;&lt;/span&gt;&lt;br&gt; Test2: &lt;select name="attr_test2"&gt; &lt;option value="1" selected&gt;1&lt;/option&gt; &lt;option value="2"&gt;2&lt;/option&gt; &lt;option value="3"&gt;3&lt;/option&gt; &lt;/select&gt;&lt;br&gt; Foo:&lt;input type="number" name="attr_foo2" value="100" disabled /&gt; &lt;/div&gt; &lt;hr&gt; &lt;/fieldset&gt;
There was indeed a bug, should be fixed now. Thanks!
1460403216
vÍnce
Pro
Sheet Author
Thanks Riley.
1460403289
vÍnce
Pro
Sheet Author
Looks good.