How to customize SharePoint List field using JSLink in SharePoint 2013,206 or Office 365?
Hello SharePointers,
In this blog, we can talk about sharepoint list field customization by JSlinks. Below is the Sharepoint JS code to customize a sharepoint List column Using JS link.
function () {
var FieldCtx= {};
FieldCtx.Templates = {};
FieldCtx.Templates.Fields = {
“Status”: {
“View”: StatusFieldViewTemplate
}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(FieldCtx);
})();
function StatusFieldViewTemplate(ctx) {
var _statusValue = ctx.CurrentItem.Status;
if (_statusValue == “Yes”) {
return “ “;
}
return _testValue;
}
Hope it helps!! Happy SharePointing Folks!!