Questions tagged [jslink]

JSLink is the new feature introduced in SharePoint 2013, loading off the burden of XSLT webparts from the developer's mind.

105 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
0 answers
898 views

How to get the user profile property that is of type Managed Metadata using JavaScript?

I have apply JSLink to the custom list's new form. I want to query the user profile property which is Managed Metadata for entered user. I wrote below code which simply gives the string. But I want ...
users1100's user avatar
  • 3,230
4 votes
1 answer
517 views

Filter task list and have check box function at the same time

Both parts of my question have been answered other places but it is not clear if the two things I would like can happen simultaneously. I have a standard task list that I wish to filter by a lookup ...
Phil Detweiler's user avatar
4 votes
0 answers
249 views

are JSLinks on WebPart , View , Fields mutually exclusive?

Elio Struyf already blogged in 2013 about a problem with missing Microsoft CSR Templates when you add a JSLink on the webpart. The checkboxes (from hierarchytaskslist.js) do not display. Seems that ...
Danny '365CSI' Engelman's user avatar
3 votes
3 answers
2k views

Conditional formatting for SharePoint Online column.

I am working on a SharePoint Online 2016 site collection and need to add conditional formatting to a few drop down fields. The drop down options are: 1: Red, 2: Amber, 3: Green. I want the field in ...
Ron McArthur's user avatar
3 votes
1 answer
275 views

JSLink in form tag is not working from schema.xml in my SharePoint hosted app

In the app ,for schema here is my code from schema.xml <Forms> <Form Type="NewForm" Name="{65B105CA-E7D8-4B28-8C9F-5B0DCBA7E0CA}" SetupPath="pages\form.aspx" WebPartZoneID="Main" Url="...
Mrunal Shidurkar's user avatar
3 votes
0 answers
551 views

CSR ListView Pagination working in IE but not in Chrome

I've created the following to override a ListView I'm using to display an Announcements List to users. This works in IE9, enabling 'Asynchronous Update' has no effect on the results. In other versions ...
Nathan Voth's user avatar
3 votes
2 answers
2k views

Unable to get property 'get_current' of undefined or null reference in JSLink on list view

we need to filter list view items based on some conditions for which we need current context(sp.ClientContext). but we are getting undefined or null reference. we have also followed the solution ...
Harminder Singh's user avatar
3 votes
1 answer
5k views

Uncaught TypeError: Cannot read property 'toString' of undefined

I have implemented the jQuery UI autocomplete functionality on a input field using JSLink. It works like a charm when I test it using Internet Explorer 9, 10, 11 and Chrome. Some users are however ...
Padawan's user avatar
  • 169
3 votes
1 answer
729 views

JSLink Publishing HTML field is not in ctx.CurrentItem

I have the following JSLink template for rendering items in a custom list containing a number of columns of type 'Publishing HTML'. The template is used on both the default view (AllItems.aspx) and ...
MichelleB's user avatar
2 votes
2 answers
146 views

Submit EditForm event handler with CSR/Jslink

Is it possible to add custom event handler to the submit button of Edit Form through CSR/JSLink? If yes, any documentation/links or example that I could use to achieve this with pure CSR?
David's user avatar
  • 39
2 votes
0 answers
32 views

Subsite provisioning from WSP - JSLinks

We are provisioning the subsites from a saved template (WSP). Everything works properly apart from the JSLinks in list forms, these are not being loaded. What we have noticed is that the ~...
Ciamas's user avatar
  • 176
2 votes
1 answer
140 views

After migrating my sites from SP 2013 on-premises to SP online, the JSLINKs associated with site columns did not work

I have SharePoint on-premises 2013, where inside some site collections, I define JSLINKs as follow, to disable site columns inside the quick edit grids:- (function () { var overrideContext = {}; ...
John John's user avatar
2 votes
0 answers
126 views

Custom Form Rendering RegisterTemplateOverrides in a promise issue

Using custom form rendering with JSLink, I fetch some data in promises before I attempt to do: SPClientTemplates.TemplateManager.RegisterTemplateOverrides(context); However because some of the ...
Frikk Fossan's user avatar
2 votes
0 answers
245 views

JS Link not working for Calculated Column with OpenPopUpPage command (SPO)

I am trying to make a JS Link for a calculated column that creates a button that invokes a modal pop form. The Calculated column has the Internal Name 'btnEditor', external name 'Update'. Questions ...
TheJDScott's user avatar
2 votes
0 answers
369 views

Unable to change the field type for "People or Group" from the built-in text field to be a drop down list

I have read the following article which shows how to change a "People or Group" field type from text field to be a drop down, which what i am looking for:- https://hyankov.wordpress.com/2015/07/15/...
John John's user avatar
2 votes
0 answers
92 views

Sharepoint JSLink Sharepoint Hosted app

I have a List with a column exam type in it. I need to use JSLink so that I can format the List using datatables. I created a custom page called Exam.aspx and added the web part to the page but can'...
user64002's user avatar
2 votes
0 answers
733 views

Filtering & Sorting of the list not working, after applying JSLink with custom render

Following the anwser from this post: JSLink: Is it possible keep the default list view header with column headers for filtering? I managed to sucessfully register new template for rendering list ...
Adam Obuchowski's user avatar
2 votes
0 answers
242 views

JSLink override failing because SharePoint internally calls a method on the field object

Here is the scenario, that you can reproduce very easily : Create a Blog subsite on your SharePoint Web. Add a post and set the "Published" DateTime field (internal name: PublishedDate) Go to the ...
M.B.'s user avatar
  • 21
2 votes
3 answers
224 views

Including a script in a jslink file

I'm building a simple app on a SP2013 online intranet that uses the Google Books API to pull in GB content (title, author, image etc). The goal is to modify a SP list view to populate the book isbn ...
matt's user avatar
  • 569
2 votes
0 answers
37 views

Store data in the list - save it to list itsef for CSR to read

I would like to ask if somebody has an idea how I can store formatting data for particular list/webpart on a page. My concept: I would like to create JSlink that would be attached in masterpage file. ...
Pedro's user avatar
  • 333
2 votes
0 answers
529 views

Sort ListView via Postback in JSLink file

I found out, that you can filter a list view in a JSLink File very easy by a postback: function filterList(ctx, filterField, filterValue){ __doPostBack(controlId, 'NotUTF8;__filter={' + ...
Dave's user avatar
  • 617
2 votes
0 answers
516 views

JSLink on managed metadata column in Sharepoint forms

I have a requirement in which i have to apply custom rendering to my managed metadata field. I have to convert the term store hierarchy into a group of three drop downs. for example, I have an ...
Vishwas Goswami's user avatar
2 votes
0 answers
132 views

JSLink not displaying

This is my second display template, which is mostly a copy of the first one. All of the configurations are the same, but for some reason it's not firing when the page is loaded. here is the ...
Jason's user avatar
  • 583
2 votes
0 answers
250 views

SP2013: Tabular view incompatible with JSLink checkboxes?

I'm using a JSLink file to replace a "Single line of text" column with a custom checkbox. For some reason, when "Allow individual item checkboxes" is enabled my checkbox won't work - I can't even ...
Omegacron's user avatar
  • 1,802
1 vote
2 answers
186 views

Using javascript I need to highlight a row if it is within 14 days of becoming due via due date, and red it if is past due or today

So I have this code that I found here at Stack Exchange that lets me highlight rows based on date: SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function () { ...
Mike's user avatar
  • 11
1 vote
1 answer
37 views

Why does the SP.SOD.executeFunc function not work properly?

I use this code to compare two dates, the date of today and the date in the list item. On the screen the dates look fine but when I check them in the debugger the dates are way off. Some are even one ...
user14010662's user avatar
1 vote
0 answers
78 views

How can I capture a URL Parameter on a list page so that I may append it to the URL of an "Add New Item" button?

Scenario: I have a list page that has already been filtered from a prior table via a URL parameter. How do I carry that URL parameter over when "create a new item" button is clicked? Issue: On the ...
Chuck Farley's user avatar
  • 1,159
1 vote
0 answers
81 views

Issues with trying to hide a column with JS Link in multiple webparts on the same page

I found a solution in the below post to hiding columns using JS link. However, I have multiple webparts on a page with different views of the same list and it is only hiding the columns in the first ...
S.Major's user avatar
  • 11
1 vote
0 answers
695 views

Jslink is not loaded at all :(

When linking to jsLink file, with console.log - is not loaded. this is the script for example: <script> console.log("loaded"); </script> I use it on the list view webpart as "jslink" ...
Eyal Segal's user avatar
1 vote
1 answer
303 views

Get title for list in csr file attached via jslink?

I need to get the list name (or title) the user is currently viewing to complete a url. I'm good with ctx.Currentitem references but no idea how to get list data like "title". Need something like ...
matt's user avatar
  • 569
1 vote
1 answer
872 views

Where can the definition for GenerateIIDForListItem(ctx, x) be found?

I've been working with JSLink lately and have come across the GenerateIIDForListItem() method on several occasions. I see why it's being used but does anyone know where I can find documentation for it?...
Tyler's user avatar
  • 41
1 vote
0 answers
80 views

CSR - Show list items horizontally

Am new to CSR. We have a requirement wherein we have to display list items horizontally. I looked for couple of links on internet by found them too complicated and bit confusing. Our guess is by ...
shoab's user avatar
  • 653
1 vote
0 answers
149 views

Handling copy paste events in SharePoint 2013 JSGrid

Any idea how we can handle the copy paste events into the JSGrid. In IE we can copy from excel and paste(like in excel). I need to validate some columns on bulk paste. However none of the handlers are ...
rjv91's user avatar
  • 172
1 vote
0 answers
2k views

Using JS Link set field value OnPostRender

I want to set field values of different fields after OnPostRender using JS Link. I am able to create the field and set value, but I want to set value only and for the little task I think creating the ...
codemirror's user avatar
1 vote
1 answer
53 views

Override or hook into default client side action?

Following is the setup. Have a custom list item with rating enabled Type of rating is "Like" so user can like or unlike the list item Have a page where the the list view is shown in the list view ...
Kannan's user avatar
  • 49
1 vote
2 answers
1k views

How do I hide list columns in a view

I have 3 list webparts on my home page. I've used this script to hide 2 columns on page load and changes (sorting, filtering). // Override list views to hide language columns based on locale ...
Batman's user avatar
  • 1,438
1 vote
0 answers
537 views

JSLink on SPField does not work in forms

SP2013 On-Premise farm solution. I'm trying to use Client Side Rendering to change how a specific text field is displayed. I want to implement a color picker, but I didn't want to have to create a ...
Thomas's user avatar
  • 980
1 vote
1 answer
56 views

SP2013 - Possible to implement like functionality through jslink or through data being pulled in via REST?

I have a list in our implementation my company uses for recognizing efforts of individuals at the company. Anyone can add an item to this list. The fields they need to fill out are "Who they are ...
Trenton M's user avatar
  • 329
1 vote
0 answers
510 views

Sharepoint - JS Link - How to perform search in a custom list?

I was working on a custom list and fortunatedly, got a custom layout using JS Link to work. I now have a search box and my custom list items visible. While that's cool and all, I was wondering if I ...
Henri Korpela's user avatar
1 vote
1 answer
263 views

How do modify sp.ui.blogs.js JsLink in Sharepoint Online?

I am trying to modify the sp.ui.blogs.js JSlink using SharePoint online, but I cannot find this.js anywhere in SharePoint designer. Any ideas? Thank you
Ryan's user avatar
  • 11
1 vote
2 answers
1k views

SharePoint JSLink Help required - Run Asnc code in OnPreRender

I am using JSlink file and using two functions (OnPreRender, Item). I want to customize Item rendering but before that I want to get data from another list using OnPreRender. The issue I am facing ...
Asif's user avatar
  • 15
1 vote
0 answers
420 views

JSLink: Publishing image field shows in page edit mode but not when page is saved

Similar to this: Can't get Custom Column of type Publishing Image to display in JSLink Publishing image field (Picture1) is in the list view Image shows up correctly in edit mode but not when ...
matt's user avatar
  • 569
1 vote
0 answers
69 views

Want to use Jslink for more generic way

I have written a JSlink for custom display of my announcement web part. JSlink is working fine and i can see the results. Now my customer wants to place 2 different announcement web parts in one page ...
yogendra Singh Rawat's user avatar
1 vote
0 answers
145 views

Combine JSLink of UserContextFilterWebPart and a XsltListViewWebPart

I have a WebPartPage which includes a XsltListViewWebPart and a UserContextFilterWebPart. In order to filter the results by the user office and 'connect' the two webparts, I added the parameter <...
Emaborsa's user avatar
  • 1,190
1 vote
1 answer
244 views

Styling the Discussions List

I am styling the discussions list web parts using CSR / JS Link. The OOB discussion list contains several buttons that allow you to select various "views", such as recent, what's hot and my ...
rlv-dan's user avatar
  • 342
1 vote
0 answers
159 views

'Srch' is undefined Shareponit View

I have a bug in JavaScript, 'Srch' is undefined in file sp.ui.listsearchbox.js, Line: 1, Column: 5673 this bug there is only on view, and I don't have any ideas how fixed this bug. Maybe ...
przemasd's user avatar
1 vote
1 answer
303 views

JSLink use with content type hub and my sites

Content type hub is used in this scenario, to syndicate the content types and columns to several web applications. I'm setting the JSLink property in a custom field definition, to load the .js file. ...
Paulius's user avatar
  • 131
1 vote
0 answers
179 views

SharePoint 365: Change Lookup Column to Render HTML

In a Document Library I have a workflow that make a link to the document in a library for example <a href="https:/xxxx/label/GFN1671-01.pdf" target="_blank"> GFN1671-01 </a> In a List ...
Patrick Niklas's user avatar
1 vote
1 answer
269 views

Enable Data View Caching JSlink

I have Enable Data View Caching unchecked and when i firts go in to my list i select the items i want to set color on press the button (pic1) and then it looks like this (pic2) when i after that ...
linkan94's user avatar
  • 147
1 vote
0 answers
274 views

How to group fields of a list under various tabs with JSLink

A simple tabbed view is achieved but I want that when the user clicks a particular tab then its corresponding fields are available for input only.
Nirbhik Sengupta's user avatar