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 .
×

If value equals (n) than (n)

im coding stupid, this is probably super basic. im just trying to make a character sheet for a custom system im playing with some friends. what im trying to do is set an attribute, and if the attribute equals a number than it displays an image on the character sheet im basically just trying to make a PBTA Harm clock but with custom art.
1613771520
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Make a type="hidden" copy of the attribute, and then you can use css selectors to refer to the value of the hidden version: HTML &lt;input class="style-controller" type="hidden" name="attr_controller" value="0"&gt; &lt;input type="number" name="attr_controller" value="0"&gt; &lt;div class="controlled-style"&gt;&lt;/div&gt; CSS .sheet-style-controller[value="5"] ~ .sheet-controlled-style{ background-image:url("<a href="http://www.yourimagehere.com" rel="nofollow">www.yourimagehere.com</a>"); } .sheet-controlled-style{ width:4em; height:4em; }
thank you