Hiding checkbox doesn't deactivate it

Hey guys,

  1. I created a form within a CMS template
  2. I made the checkbox to only show when the switch is on
  3. I need the checkbox to be automatically checked when it’s visible
  4. I found that even though it’s hidden, the checkbox is being submitted to the form as true, which I don’t want to happen when it’s not visible. Is there a way to have this deactivate when hidden?

https://preview.webflow.com/preview/collectivecampusglobe?utm_medium=preview_link&utm_source=designer&utm_content=collectivecampusglobe&preview=233757f842e35bf112220a9dfc7f5181&pageId=5ae17eb10974c580edc53f64&itemId=5ae17eb10974c5efb5c544ca&mode=preview

You would need to use custom code to remove the element from the DOM.