# Is there a way to populate UI fields using variables within a module?

**URL:** <https://community.hubspot.com/t/is-there-a-way-to-populate-ui-fields-using-variables-within-a-module/87864>\
**Category:** CMS Development\
**Tags:** free\
**Created:** [August 19, 2023, 4:11pm UTC](https://community.hubspot.com/t/is-there-a-way-to-populate-ui-fields-using-variables-within-a-module/87864 "2023-08-19T16:11:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NParker4](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@NParker4](https://community.hubspot.com/u/NParker4)\
**Post date:** [August 19, 2023, 4:11pm UTC](https://community.hubspot.com/t/is-there-a-way-to-populate-ui-fields-using-variables-within-a-module/87864/1 "2023-08-19T16:11:51Z")

</div>

I want to know if there is a way to dynamically create fields in UI editor using properties within the module?

{% set tagChoices = [] %}  
{% set myTags = blog\_tags(blog, 250) %}

{% choice “filter by tag” label=“tags to filter post by”, choices={{myTags}}, export\_to\_template\_context=True %}

Current View:

 ![NParker4_0-1692461465677.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/1/71594f574514b194b5084688070d3cd6d9c9ba22.png)

note: The choices module does not render which may be due to the export\_to\_template\_context prop being true and the options do not show up

Just to confirm, I used a choice tag without the export\_to\_template\_context to see if that would fix it  
Screenshots:

![NParker4_0-1692461677989.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/c/cbeb605e6dc16d281035c11acc184aa3b7913cbe.png)

note: There were no updates to the view in design manager’s preview screen (same as above picture)

Desired Result:  
There should be a UI input that lets me pick a tag from my blog as an option for the choice module in the preview screen of the design manager

---

<div class="post-metadata">

**Author:** ![Gracjan](https://avatars.discourse-cdn.com/v4/letter/g/e99b99/32.png) [@Gracjan](https://community.hubspot.com/u/Gracjan)\
**Post date:** [August 20, 2023, 10:50am UTC](https://community.hubspot.com/t/is-there-a-way-to-populate-ui-fields-using-variables-within-a-module/87864/2 "2023-08-20T10:50:07Z")

</div>

Hi NParker4,  
[export\_to\_template\_context](https://developers.hubspot.com/docs/cms/building-blocks/modules/export-to-template-context) is not supported in custom modules.

For this case I would suggest you to use the tag field selector:

 ![Gracjan_0-1692528439623.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/e/ee069e98ed009e4bfbfbda71064392c924c09fcf.png)
