# Creating an on-off toggle for modules

**URL:** <https://community.hubspot.com/t/creating-an-on-off-toggle-for-modules/29683>\
**Category:** CMS Development\
**Tags:** design-manager\
**Created:** [January 4, 2021, 5:47pm UTC](https://community.hubspot.com/t/creating-an-on-off-toggle-for-modules/29683 "2021-01-04T17:47:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LKootz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lkootz/32/9373_2.png) [@LKootz](https://community.hubspot.com/u/LKootz)\
**Post date:** [January 4, 2021, 5:47pm UTC](https://community.hubspot.com/t/creating-an-on-off-toggle-for-modules/29683/1 "2021-01-04T17:47:44Z")

</div>

I’m attempting to create some simple template customization for my publishers (without allowing them to drag and drop) and I’m trying to work with the boolean and/or choice field in order to make it work.  
My idea is that if the module is turned on, it will display. If the publisher turns it off, the display will set to “none.” Something like this below:

```lia-code-sample
 #agenda
 display: {{ module.choice_field }};

```

As such, I created a choice with an empty value to display, and a “none” value to turn off the display and placed the widget in the CSS property.

It seems simple enough, but I cannot seem to get this to run properly. I’m very new to using booleans and choice fields in templates so I’m sure there’s something I’m missing. Any advice would be appreciated!

---

<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:** [January 4, 2021, 6:07pm UTC](https://community.hubspot.com/t/creating-an-on-off-toggle-for-modules/29683/2 "2021-01-04T18:07:16Z")

</div>

Hi @LKootz ,

Welcome to the Community!

the hubl is written correctly, but if that is a direct copy from the css you are using, the css itself is invalid.

You are missing the opening and ending { }. Should look something like this

```lia-code-sample
#agenda{
 display: {{ module.choice_field }};
}

```

---

<div class="post-metadata">

**Author:** ![LKootz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lkootz/32/9373_2.png) [@LKootz](https://community.hubspot.com/u/LKootz)\
**Post date:** [January 4, 2021, 8:14pm UTC](https://community.hubspot.com/t/creating-an-on-off-toggle-for-modules/29683/3 "2021-01-04T20:14:57Z")

</div>

Ugh, duh! Worked perfectly, thank you!

---

<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:** [January 4, 2021, 9:07pm UTC](https://community.hubspot.com/t/creating-an-on-off-toggle-for-modules/29683/4 "2021-01-04T21:07:27Z")

</div>

Trust me, I’ve been there 😄
