Dynamic widget HTML content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 09:50 AM
Hi All,,
I have a requirement where I need to show different messages in widget with different fonts, text and colours based on a variable selection on the catalog item.
How can I update html content dynamically when variable value changes?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 11:33 AM
HI,
That is what the link specifies. That you can use $watch functionality in your custom widget along with g_form.getValue('variablename');
So if the variables value changes then it will trigger code in that watch function and you can read the value in that function. Depending upon that value you can change the CSS associated with your widget.
Thanks,
Ashutosh