# keeping the subscription types unchecked by default

**URL:** <https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912>\
**Category:** CMS Development\
**Tags:** design-manager, javascript\
**Created:** [March 9, 2021, 6:16pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912 "2021-03-09T18:16:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![julieta1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/julieta1/32/13521_2.png) [@julieta1](https://community.hubspot.com/u/julieta1)\
**Post date:** [March 9, 2021, 6:16pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912/1 "2021-03-09T18:16:20Z")

</div>

I’m trying to set up the unsubscribe page in a way that the subscription types are unchecked by default. Currently all subscribe types are checked by default when “manage preferences” is clicked in the email footers. This makes it too easy to unsubscribe to every email type without reading the descriptions for each type, and then not get important communication from us about their product.

Has anyone tried to do this before? I’m not very savvy in javascript but i can potentially work off of something similar that has already been built for a similar purpose.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 10, 2021, 5:25pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912/2 "2021-03-10T17:25:49Z")

</div>

Hey @julieta1

There is this guy, we call him @piersg around these parts. And I bet he has something to say on this topic.

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 10, 2021, 5:39pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912/3 "2021-03-10T17:39:22Z")

</div>

Hi @julieta1, this is intended behaviour in Hubspot: when you go to manage preferences from an email, your current subscriptions are automatically selected for you. You’re seeing all of them selected because you are suscribed to all of your own types. I would advise against changing this user experience.

That said, if you really want to change this, this script should work

```lia-code-sample
var checkboxes = document.querySelectorAll('.fakelabel input[type="checkbox"]');

checkboxes.forEach((i) => {
 i.checked = false;
});

```

---

<div class="post-metadata">

**Author:** ![julieta1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/julieta1/32/13521_2.png) [@julieta1](https://community.hubspot.com/u/julieta1)\
**Post date:** [March 10, 2021, 6:16pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912/4 "2021-03-10T18:16:01Z")

</div>

Thank you @dennisedson and @piersg !

I created a new javascript file and added the script above in as-is. I then linked it to the subscription page template, but it’s not working on my end. Is there anything I missed?

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 10, 2021, 6:29pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912/5 "2021-03-10T18:29:54Z")

</div>

I would add it to the template HTML in a script tag like this. The window.onload event is fired when the whole page has loaded. You want to make sure the checkboxes are present in the DOM before doing anything to them, otherwise the checkboxes variable will return null.

```lia-code-sample
<script>
 window.onload = (event) => {
 var checkboxes = document.querySelectorAll('.fakelabel input[type="checkbox"]');
 checkboxes.forEach((i) => {
 i.checked = false;
 });
 };
</script>

```

---

<div class="post-metadata">

**Author:** ![julieta1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/julieta1/32/13521_2.png) [@julieta1](https://community.hubspot.com/u/julieta1)\
**Post date:** [March 10, 2021, 6:40pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912/6 "2021-03-10T18:40:39Z")

</div>

Thanks so much for your help!! Really appreciate it.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 10, 2021, 6:42pm UTC](https://community.hubspot.com/t/keeping-the-subscription-types-unchecked-by-default/32912/7 "2021-03-10T18:42:14Z")

</div>

We’ll keep @piersg around the community for a bit longer 😉
