# Choice field value issues

**URL:** <https://community.hubspot.com/t/choice-field-value-issues/41040>\
**Category:** CMS Development\
**Created:** [July 20, 2021, 8:42pm UTC](https://community.hubspot.com/t/choice-field-value-issues/41040 "2021-07-20T20:42:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spotthehub](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/spotthehub/32/98942_2.png) [@spotthehub](https://community.hubspot.com/u/spotthehub)\
**Post date:** [July 20, 2021, 8:42pm UTC](https://community.hubspot.com/t/choice-field-value-issues/41040/1 "2021-07-20T20:42:31Z")

</div>

Hi, I’m creating a module and would like to add a custom font option to it.  
I’ve created simple css hubl code like this:

p, li, h1, h2, h3, h4, button, span, a {  
font-family: {{ module.font\_family }};  
}

and created a font\_family choice field like this:

 ![spotthehub_0-1626813624338.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/5/55205e01872d2f218896b2e575ded52b831fa74a.png)

but it’s not rendering the output correctly:

`p,li,h1,h2,h3,h4,button,span,a{font-family:}`

I’ve tried font-family: {{ module.font\_family.value }}, etc…

Anyone see what I’m doing wrong?

Thanks

Ben

---

<div class="post-metadata">

**Author:** ![miljkovicmisa](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miljkovicmisa/32/86357_2.png) [@miljkovicmisa](https://community.hubspot.com/u/miljkovicmisa)\
**Post date:** [July 21, 2021, 7:52am UTC](https://community.hubspot.com/t/choice-field-value-issues/41040/2 "2021-07-21T07:52:31Z")

</div>

Hello @spotthehub and thanks for sharing your issue.

First of all, css in modules is very limited in comparison to html, thus you won’t be able to access your value from the font\_family from the css of the module. [Here is more info on that.](https://developers.hubspot.com/docs/cms/building-blocks/modules/files#css-module-css-)

For that matter you should probably use the require\_css block in the html of the module like this:

```lia-code-sample
{% require_css %}
<style>
 p,li,h1,h2,h3,h4,button,span,a{
 font-family: {{ module.font_family.value }} ;
 }
</style>
{% end_require_css %}

```

This and much more regaring modules is all very well documented in [this article about module development](https://developers.hubspot.com/docs/cms/building-blocks/modules/files).

I hope I gave you some direction what to look at, if it helped mark this answer as a solution.

---

<div class="post-metadata">

**Author:** ![spotthehub](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/spotthehub/32/98942_2.png) [@spotthehub](https://community.hubspot.com/u/spotthehub)\
**Post date:** [July 21, 2021, 1:33pm UTC](https://community.hubspot.com/t/choice-field-value-issues/41040/3 "2021-07-21T13:33:35Z")

</div>

Hey @miljkovicmisa thanks for the help. This worked well for my needs.  
I was confused by this section in the documentation that shows variables being accessed:

 ![spotthehub_0-1626874405492.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/a/3a587e5fc907398792c2428d78f0774b339f6c7a.png)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [July 22, 2021, 1:09pm UTC](https://community.hubspot.com/t/choice-field-value-issues/41040/4 "2021-07-22T13:09:27Z")

</div>

Hi @spotthehub ,  
Use rich text under module and get option font-family. Check screenshot:

> **[Screenshot](https://prnt.sc/1ebwsh6)**
>
> Captured with Lightshot

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.
