Icon Tag not populating with Icon Field

Hi,

I want to create a styled list custom module. Per each item I want the user to be able to select an icon and enter a text.

The module.html will look something like this:

<ul class="imc-styled-list">
 <li class="imc-styled-list--item">
 {%icon "icon_field"
 name="{{module.icon_field.name}}",
 unicode="{{module.icon_field.unicode}}",
 type="{{module.icon_field.type}}",
 icon_set="{{module.icon_field.icon_set}}"
 %}
 {% text "imc-styled-list--text-field" label="Gib hier den Text ein" value={{module.text_field}}%}
 </li>
</ul>

and this is the fields.json file:

[
 {
 "name" : "icon_field",
 "label" : "Icon",
 "required" : false,
 "locked" : false,
 "icon_set" : "fontawesome-5.14.0",
 "type" : "icon"
 },
 {
 "name" : "text_field",
 "label" : "Text",
 "required" : false,
 "locked" : false,
 "type" : "text"
 }
]

Whenever I change the selected icon, the output doesn’t change. It always remains the default hubspot icon:

Any help would be highly appreciated.
Regards Chris

Hi @CWeissteiner,

this should work

<ul class="imc-styled-list">
 <li class="imc-styled-list--item">
 {% icon 
				name="{{ module.icon_field.name }}" 	
				style="{{ module.icon_field.type }}" 	
				unicode="{{ module.icon_field.unicode }}"
				icon_set="{{ module.icon_field.icon_set }}" 
				%}
 {% text "imc-styled-list--text-field" label="Gib hier den Text ein" value={{module.text_field}}%}
 </li>
</ul>

You don’t need the

"icon_field"

after {% icon …

(Same goes for the text)

best,

@CWeissteiner