I have applied a JSLink to the custom list's new form in which I want to get the Current List title to access the list column further.
My code is:
(function () {
var DepartmentCtx = {};
DepartmentCtx.Templates = {};
DepartmentCtx.Templates.Fields = {
"oiplbDepartment": {
"NewForm": oiplbDepartment
}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(
DepartmentCtx
);
})();
function oiplbDepartment(ctx) {
var managerField = SPClientTemplates.Utility.GetFormContextForCurrentField(ctx);
// Here I want to get the current NewForm's list title.
return "<Label ID='lblDepartmentValue' Style='color:red'>Please Enter Project Owner</Label>";
}
What should I do to get the list title?