Hi there, hope all is well. I have a sharepoint list using the calculated field to display an image based on an another field's value. Like "risk identified" in the status column would display a yellow icon in view (html in the field). I did this using JSLink as Microsoft does not support the number workaround anymore. The JS is quite simple really (renders the HTML):
(function () {
var overrideCtx = {};
overrideCtx.Templates = {};
overrideCtx.Templates.Fields = {
'Engaged_IMG': {'View': renderField}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();
function renderField(ctx) {
return STSHtmlDecode(ctx.CurrentItem[ctx.CurrentFieldSchema.Name]);
}
Now, how do I do the same in my infopath form? I am using infopath to design the new / display / edit form but can't get the HTML in the calculated field to render. It just displays as text <img .... The JSLink option in the webpart seems not to exist in this case.
Thank you,
Robert