Hello all, I have a repeating section for a character's weapons with a roll button for each weapon. I would like to hide this button when the character becomes too encumbered. I can't seem to get the checkbox to check with the sheet worker. Here is the HTML for the section: <fieldset>
<input name="attr_itemname" type="text" placeholder="Name">
<input type="hidden" name="attr_test" value="0"/>
<input type="checkbox" name="attr_toggle_double_encumbered_roll_weapon_damage" value="1"/>
<button type='roll' name="roll_WeaponDamage" value="@{character_name} attacks with @{itemname} and rolls a [[1d4]]."></button>
</fieldset> Sheet Worker Code for this specifically: getSectionIDs("repeating_weapons", function(rowIds) {
var toggles = [];
for(var i=0; i < rowIds.length; i++) {
toggles.push("repeating_weapons_" + rowIds[i] + "_toggle_double_encumbered_roll_weapon_damage");
}
getAttrs(toggles, function(values) {
setAttrs({
toggles: Number(1)
});
});
}); Any help is appreciated, thank you!