How to conditionally clear or select a checkbox option in the form?