HI,
I have a column which contains a Note field and stores a URL.
I would like to display in the custom list "AllItems.aspx" view as "Edit" with a hyperlink for that column, so that the whole link is not visible, and a Hyperlink is shown. I have tried the below with JSLink, but the link is not getting changed.
I have tried the below code:
(function () {
var statusFieldCtx = {};
statusFieldCtx.Templates = {};
statusFieldCtx.BaseViewID = 1;
statusFieldCtx.ListTemplateType = 10003;
statusFieldCtx.Templates.Fields = {
"TestFormUrl": {"View": StatusFieldViewTemplate
}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(statusFieldCtx);
})();
function StatusFieldViewTemplate(ctx) {
if (ctx != null && ctx.CurrentItem != null)
var priority = ctx.CurrentItem.TestFormUrl;
priority = "<a href='"+ priority +">Edit</a>";
return priority;
}How to fix this?
Thanks