Select all/clear all for Multi Checkbox

I have multi check box linked to the tag field of a dataset. I am trying to code select all, clear all option for these checkboxes. The following code does nothing.

$w( ‘#SubjectCheckbox’ ).options.forEach(checkbox=>{
checkbox.checked = true ;
})

I tried setting checked to false same way . it doesn’t work

How can I Select /unselect all ?

Hi,
You should use the .value property of the checkbox in order to change its state, check out the documentation here .