I’d love to put an icon in this text… is there a way to do that?
dmx-text="is_deleted==0?' ICON_HERE Delete':'ICON_HERE Undelete'"
I’d love to put an icon in this text… is there a way to do that?
dmx-text="is_deleted==0?' ICON_HERE Delete':'ICON_HERE Undelete'"
Use dmx-html instead of dmx-text
So I hand code it with >
and <
…?
just use:
dmx-html="your hrml content here"
Did you get this to work @Antony?
I wanted to have a FA icon in a button that is getting it text displayed dynamically but it still won’t show the icon even if I use dmx-html instead of dmx-text
Some code from a page of mine which may help you…
<button class="btn btn-sm btn-warning" dmx-on:click="var_toggle_head.setValue(var_toggle_head.value == 0 ? 1 : 0)" dmx-html="(var_toggle_head.value == 0 ? '<i class=\'fad fa-angle-double-down fa-lg fa-fw icon\'></i> Show Extra Information' : '<i class=\'fad fa-angle-double-up fa-lg fa-fw icon\'></i> Hide Extra Information')"></button>
Ok…think that makes sense. Will give it a shot see if I can get the right syntax
Thanks, i did get this working eventually but as i was using dynamic text i had to add the icon html as part of the concat.
Here is what worked in the end:
dmx-html="collapseFirstName.where_firstName.value.capitalize().concat(': ').concat(collapseFirstName.fil_firstName.value.capitalize()).concat('<i class=\'fas fa-times-circle ml-2 \'></i>')"