Hello, I am working on a custom character sheet and wish to hide the roll result if there were no modifiers entered in the input field. The button html is currently like this: <div class="example">
<input type="number" name="attr_modifier" value="" />
</div>
<div class="dice-button">
<button type="roll" class="sheet-dice-icon" value="&{template:custom} {{name=@{character_name}}} {{r1=[[1d20+@{modifier}]]}} {{desc=@{desc}}}"></button>
</div> And the roll template looks like this: <rolltemplate class="sheet-rolltemplate-custom">
...
{{#dice}}
<div class="result-style">{{r1}}</div>
{{/dice}}
</rolltemplate> Currently, even if the modifier attribute is empty, it still rolls 1d20 and displays the result because of how I structured {{r1}}. Would there be a better way to structure this? Or is there a JS to display div as none when the value is empty? Thanks in advance.