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

Using attributes to populate html element values - not working

I'm working on implementing a homebrew game's character sheet, and I can't figure out why my attributes are not populating values on the sheet. Using the code snippet below I confirmed that a fresh character is getting the attributes (with correct numeric values) that the character sheet creates. In the input element where I try to pull the value back out, however, I just get a blank. I tried using the commented line instead of the select element, but the result was the same. I also tried naming the input element with attr_ and roll_ just in case, but same result. <td colspan="2"> <select name="attr_Dexterity"> <option value="0">Deficient</option> <option value="2">Below Average</option> <option value="4">Average</option> <option value="6">Above Average</option> <option value="8">Extraordinary</option> <option value="10">Superhuman</option> </select> </td> <td colspan="1"> <!--<input type="number" name="attr_Dexterity" value="4" disabled="true" />--> <input type="number" name="sheet-DexValue" value="@{Dexterity}" disabled="true" /> </td> After looking through github for an hour, I didn't find any examples that I can check my work against, and as far as I can tell from the wiki and w3schools, my syntax is correct. What did I miss? Thanks in advance.
1401424821
Sam M.
Pro
Sheet Author
LM said: <input type="number" name="sheet-DexValue" value="@{Dexterity}" disabled="true" /> name needs to be attr_DexValue. The sheet prefix is for CSS classes.
1401457218

Edited 1401457238
As mentioned above, I got the same result with all three prefixes. As it turns out, however, this might have been some sort of weird browser issue. The problem persisted until I reopened Chrome, then the code immediately worked (with attr_, which was in a different attribute).