# Export to template not working(?)

**URL:** <https://community.hubspot.com/t/export-to-template-not-working/10856>\
**Category:** CMS Development\
**Created:** [November 8, 2018, 2:33pm UTC](https://community.hubspot.com/t/export-to-template-not-working/10856 "2018-11-08T14:33:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stinesandberg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stinesandberg/32/9140_2.png) [@stinesandberg](https://community.hubspot.com/u/stinesandberg)\
**Post date:** [November 8, 2018, 2:33pm UTC](https://community.hubspot.com/t/export-to-template-not-working/10856/1 "2018-11-08T14:33:27Z")

</div>

Hi!

So I’ve been trying to get the value from a text-field in a html-template into a \<style\>-tag. However when I try to retrieve the value I only get 0.

```auto
<!--The text module I want to get value from.-->

{% text "background-opacity" label="Background Opacity", value="heihei" export_to_template_context=True %}

<!--How I'm trying to use the value-->
<style>
 	.header img{
 	opacity: {{ widget_data.background-opacity.value }} !important;
 }
 </style>

```

In inspect mode on .header img i get:

opacity: 0 !important;

This happens no matter what I do. I’ve tried to put the value into a h1 tag as well. I only get a 0 then as well. It does’nt show up on the page in the h1 tag either. It’s more like it’s null and not 0.

---

<div class="post-metadata">

**Author:** ![valerajoey](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/valerajoey/32/35482_2.png) [@valerajoey](https://community.hubspot.com/u/valerajoey)\
**Post date:** [November 9, 2018, 1:17am UTC](https://community.hubspot.com/t/export-to-template-not-working/10856/2 "2018-11-09T01:17:46Z")

</div>

try to use Underscore on your widget name

`{{ widget_data.background_opacity.value }}`

or you can try to open the developer option and search for the name of your fields if it really exists in the first place.  
Hope this works
