First, the min and max tags don't work in roll20. To limit to those values you need a sheet worker to check the current value and reset to 0 or 6 if outside that range. Disabling the checkbox cant be done directly in the sheet worker. You can uncheck it, like this: on("change:COMNumber", function(){ getAttrs(["COMNumber"], function(values) { var number = parseInt(values.COMNumber) || 0; if(number < 6)
{
setAttrs({ COM6: 0 });
} }); }); You can't disable the checkbox, but you can hide and show elements using CSS. So, you need two copies of the checkbox, one disabled and one not disabled. Each needs different class that can be targeted in the CSS. You also need a hidden attribute, with a class of its own. Your sheet worker sets the value of this hidden input (0 or 1) in the if statement, and the class of that input is used in CSS to choose which checkbox is hidden. For example, where your checkbox is, you'd have <input type="hidden" name="attr_com6_checkbox" value="0" class="sheet-com6-toggle"> <input type="checkbox" name="attr_com6" value="1" class="sheet-disabled" disabled="true"> <input type="checkbox" name="attr_com6" value="1" class="sheet-abled"> In your CSS, you would have something like this to show or hide those checkboxes: .charsheet input.sheet-com6-toggle[value="0"] ~ input.sheet-disabled, .charsheet input.sheet-com6-toggle[value="1"] ~ input.sheet-abled { display: none; } Finally, the above sheet worker would be modified as follows: on("change:COMNumber", function(){ getAttrs(["COMNumber"], function(values) { var number = parseInt(values.COMNumber) || 0; if(number < 6)
{
setAttrs({ COM6: 0, com6_checkbox: 0 });
} else { setAttrs({ com6_checkbox: 1 } }); });