Steps to reproduce:
1. Add disabled attribute to a checkbox field via code.
2. Go and edit a node that have the check box field already checked.
3. Click once on the disabled check box.
4. note that nothing changes.
5. Save.
6. go back to the edit form and see that the value of the checkbox actually changed.
Comments
Comment #2
jidrone commentedFor others looking for a solution, I found it is caused by the browser, so it has nothing to do with this module.
You can do the following to have a similiar functionality:
$form['your_field']['widget']['#options_attributes']['option_id'] = ['onclick' => 'this.checked=!this.checked;'];It was the easiest fix I found here https://stackoverflow.com/a/155349