
I'm trying to use checkboxes on the sheet to show/hide attributes to be included in the output of a macro using roll template logic. I'm very close to getting what I want. The attributes are shown correctly when checked, but I'm having a problem hiding the attribute when unchecked. The attribute defaults to value="0" when unchecked so my macro displays "0" instead of just hiding the attribute.
I'm probably going about this all wrong.
Any suggestions appreciated. TIA
With boxes checked,

Notes are included (yea!)


The default value="0" for unchecked is being displayed (boo!) I want nothing to show if the box is unchecked.

Here's a snippet of my html
roll template(just included the snippet that pertains to the code above.)
I'm probably going about this all wrong.
Any suggestions appreciated. TIA
With boxes checked,
Notes are included (yea!)
This is my problem.
With boxes unchecked,The default value="0" for unchecked is being displayed (boo!) I want nothing to show if the box is unchecked.
Here's a snippet of my html
<div> <span><input type="hidden" title="@{repeating_weapon_X_show-melee-notes}" name="attr_show-melee-notes" value="{{@{repeating_weapon_X_show-melee-attack-notes}}}"/></span> <span><input type="hidden" title="@{repeating_weapon_X_show-ranged-notes}" name="attr_show-ranged-notes" value="{{@{repeating_weapon_X_show-ranged-attack-notes}}}"/></span> <span><input type="hidden" title="@{repeating_weapon_X_show-cmb-notes}" name="attr_show-cmb-notes" value="{{@{repeating_weapon_X_show-melee-cmb-notes}}}"/></span> <span><input type="hidden" title="@{repeating_weapon_X_show-attack-notes}" name="attr_show-attack-notes" value="{{@{repeating_weapon_X_show-attack-notes}}}"/></span> </div> <div class="sheet-table"> <div class="sheet-table-row"> <span class="sheet-table-data sheet-center sheet-small-label" style="width:20%;"><b title="Include these additional notes with the attack roll.">Include notes?</b></span> <span class="sheet-table-data sheet-center sheet-small-label" style="width:20%;"><label><input type="checkbox" title="@{repeating_weapon_X_show-melee-attack-notes}" name="attr_show-melee-attack-notes" value="@{melee-attack-notes}"/><b title="Include Melee attack notes"> Melee Notes</b></label></span> <span class="sheet-table-data sheet-center sheet-small-label" style="width:20%;"><label><input type="checkbox" title="@{repeating_weapon_X_show-ranged-attack-notes}" name="attr_show-ranged-attack-notes" value="@{ranged-attack-notes}"/><b title="Include Ranged attack notes"> Ranged Notes</b></label></span> <span class="sheet-table-data sheet-center sheet-small-label" style="width:20%;"><label><input type="checkbox" title="@{repeating_weapon_X_show-cmb-notes}" name="attr_show-cmb-notes" value="@{cmb-notes}"/><b title="Include CMB notes"> CMB Notes</b></label></span> <span class="sheet-table-data sheet-center sheet-small-label" style="width:20%;"><label><input type="checkbox" title="@{repeating_weapon_X_show-attack-notes}" name="attr_show-attack-notes" value="@{attack-notes}"/><b title="Include Attack notes"> Attack Notes</b></label></span> </div> </div>
roll template(just included the snippet that pertains to the code above.)
{{#show_melee_notes}} <tr><td colspan="2">Melee Notes: <span style="font-weight:normal;">{{show_melee_notes}}</span></td></tr> {{/show_melee_notes}} {{#show_ranged_notes}} <tr><td colspan="2">Ranged Notes: <span style="font-weight:normal;">{{show_ranged_notes}}</span></td></tr> {{/show_ranged_notes}} {{#show_cmb_notes}} <tr><td colspan="2">CMB Notes: <span style="font-weight:normal;">{{show_cmb_notes}}</span></td></tr> {{/show_cmb_notes}} {{#show_attack_notes}} <tr><td colspan="2">Attack Notes: <span style="font-weight:normal;">{{show_attack_notes}}</span></td></tr> {{/show_attack_notes}} {{#allprops() character_name character_id name_link attack damage crit_confirm crit_damage description attack2 damage2 crit_confirm2 crit_damage2 show_melee_notes show_ranged_notes show_cmb_notes show_attack_notes}} <tr><td>{{key}}</td><td>{{value}}</td></tr> {{/allprops() character_name character_id name_link attack damage crit_confirm crit_damage description attack2 damage2 crit_confirm2 crit_damage2 show_melee_notes show_ranged_notes show_cmb_notes show_attack_notes}}Macro
{template:pf_attack}{{show_melee_notes=@{show-melee-attack-notes}}} {{show_ranged_notes=@{show-ranged-attack-notes}}} {{show_cmb_notes=@{show-cmb-notes}}} {{show_attack_notes=@{show-attack-notes}}}