diff --git a/ecc/blocks/form-handler/controllers/event-community-link-component-controller.js b/ecc/blocks/form-handler/controllers/event-community-link-component-controller.js index 46490744..01d23a82 100644 --- a/ecc/blocks/form-handler/controllers/event-community-link-component-controller.js +++ b/ecc/blocks/form-handler/controllers/event-community-link-component-controller.js @@ -33,6 +33,7 @@ export default function init(component, props) { const updateInputState = () => { input.required = checkbox.checked; + if (!checkbox.checked) input.value = ''; }; if (checkbox && input) { diff --git a/ecc/blocks/form-handler/controllers/registration-details-component-controller.js b/ecc/blocks/form-handler/controllers/registration-details-component-controller.js index fbfb5f7c..be41f423 100644 --- a/ecc/blocks/form-handler/controllers/registration-details-component-controller.js +++ b/ecc/blocks/form-handler/controllers/registration-details-component-controller.js @@ -33,6 +33,7 @@ function prefillFields(component, props) { contactHostEl.addEventListener('change', () => { hostEmailEl.disabled = !contactHostEl.checked; + if (!contactHostEl.checked) hostEmailEl.value = ''; }); } }