Questions tagged [jslink]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
1k views

Change the Cell color on postrender using JSlink

I am using JSlink to change the cell color of a calculated column. I have to use Postrendering for that. The problem is that I cannot manipulate the cells. I can color the rows but cannot color just ...
3
votes
2answers
4k views

Hide more than one list column with JSlink

I am using CSR against two columns, both of which I need to hide from the list view. I have used this example to successfully hide one: function hideFields(ctx) { var cell = $("div [name='myField']...
2
votes
1answer
573 views

JS Link to convert the webparts on the page to accordian [closed]

On a webpart page we have around 4 webparts to start with. Each webpart has some data: image, text, video. We want this information to be displayed in an Accordian format. I.E each webpart title ...
1
vote
2answers
1k views

Hide Document Library Name column using JSLink in SharePoint 2013

How can we hide the document library column title called 'Name' using JSLink? I would still like it to display the contents Tried the solution Amal Hashim, there is some space issue in the library ...
3
votes
2answers
587 views

Adding JSLink through JavaScript

I have a .js file which I want to add as a JSLink to the web part properties in a List View. For further clarification, I'm talking about the property, they're manually adding a JSLink to in this ...
3
votes
1answer
965 views

Adding JSLink to Newform.aspx

I have a list instance being created from a SharePoint Hosted App. How can change the JSLink reference from within the list definition, schema.xml ? I can change it on a List view like so: <JSLink&...
1
vote
1answer
3k views

Use JSLink to Bold Title and open link in new window in SharePoint 2013

I used this solution to open my link in new window, it works great when alone. Open the list title link in new window using jslink office 365 But when I add to the code below, the title stays bold ...
1
vote
1answer
815 views

Open the list title link in new window using jslink office 365

Below is the code i am using, it is not firing. Field Name is--> Name(linked to item with edit menu) (function () { // Initialize the variables for overrides objects var ...
1
vote
1answer
472 views

Pull JobTitle from Person field in JSLink

I'm using the following code in a webpart JSLink to pull user information from a Person and Groups Field: (function () { var overrideCtx = {}; overrideCtx.Templates = {}; ...
0
votes
1answer
95 views

CSR List thead row under items

Trying to learn CSR. My first try looks like this: (function (){ //init var inCtx = {}; inCtx.Templates = {}; inCtx.Templates.Item = ItemOverride; SPClientTemplates....
0
votes
2answers
230 views

SharePoint 2013 Jslink : Two List having there own jslink not working on same page

Scenario: We need to display two different list(custom list) on single page. Both list-view have separate Jslink. Issue: Let say listview1 and listview2. If i add listview1 and then listview2. ...
0
votes
2answers
8k views

JS Link or Content Editor Web part in SharePoint 2013

Can someone help me decide between JS Link and CEWP or any alternative that you see fit? I need to build a page (actually entire site with some 5, 6 pages). These pages should look pretty decent (...
1
vote
0answers
358 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 ...
1
vote
3answers
492 views

JSLink - apply different code depending on the current view

I need to rename the list headers and used the code as provided here: Can I change the display name of column in a listview using JSlink It works fine, but only for the current view. When I change ...
0
votes
3answers
239 views

Conditional Formatting to apply color to indicate progression towards a numeric target

I'm wondering if anyone can help me with a calculate column/JS Link formula. I have a monthly performance indicator which is a count of the number of inspections I perform. There is a target number ...
0
votes
1answer
343 views

Passing a value to a custom JSLink field type

I'm creating a custom field type for Sharepoint using the JSLink method. This field will be used in New List Item / Edit List Item forms. What I want to do is to allow a user to set a custom ...
0
votes
1answer
326 views

JSLink button to open modal window

I have created a JSLink file to open the edit form for a list item in a modal window. It works great on an Office 365 dev site, but when I try to use it within our on-premise SharePoint 2013 ...
1
vote
1answer
3k views

Best way to learn about Client-Side Rendering with JSLink

I figured out that using JSLink can lift SharePoint onto a new level. But unfortunately I am completely lost on really understanding it. I feel like just copy pasting code samples does not help me, ...
1
vote
1answer
1k views

Keep JS Link when adding a list as a webpart

I've discovered a strange behavior. I've generated a list which I customized a lot among other things using a .js file which I added to the JSLink field of the web part. The list is working ...
0
votes
2answers
2k views

Display a SharePoint list row in a table with JS

I have a SharePoint list with one row containing project info. projectnumber ProjectName ProjectAdmin Contracter and so on. I want to display this as a nice table in the teamsite. I reckon this is ...
0
votes
1answer
655 views

SharePoint Foundation 2013 JSLink (CSR) not working

I have a simple js example to try. Here the code: (function () { var overrideContext = {}; overrideContext.Templates = {}; overrideContext.Templates.Item = overrideTemplate; ...
0
votes
2answers
3k views

Customize Lookup form field (new, edit) with JSLink

How can I get the options for some LookUp field, in JSLink? Code: SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ Templates: { Fields: { Initiative: { ...
1
vote
1answer
5k views

Use CSR/JSLink to hide Fields in New/Edit Form

JSLink don't work for me in this case, can some body say is this Code below ok. (function () { (window.jQuery || document.write('<script src="https://teamsite/_catalogs/masterpage/jquery-1....
0
votes
0answers
323 views

JSLink custom field type not working in a form created by SharePoint Designer

I have created a custom field type for a SharePoint 2013 list using the JSLink method. It is basically a rich text editor that uses Ckedit.js. It works fine with SharePoint's default new/edit forms ...
1
vote
2answers
161 views

Can't get Javascript CSR display template to work in listview

I'm totally at wits end here. I am trying to use CSR to display custom html depending on a "case status" column. I've added the JS file to the masterpage folder and used the JS Link to connect it. No ...
0
votes
1answer
491 views

RegisterModuleInit for jslink ONLY works when the file is in Style Library

Why does RegisterModuleInit only take when the file is stored in the Style Library? I'm using MDS and my JSLink file only works the first time unless it is stored there. I've tried putting it in: /...
0
votes
2answers
746 views

JSLink: How can you access a list item's properties which are not added to the view?

In order to render certain controls in a view via JSLink, I need to check several conditions based on some fields we would like to keep hidden (not just uneditable in a grid view). How can I do that ...
0
votes
2answers
3k views

SharePoint JSLink override not working

I need to overwrite a multiline sharepoint field by a tooltip but it's not wotking. (function () { var SubjectFiledContext = {}; SubjectFiledContext.Templates = {}; ...
3
votes
2answers
774 views

Color code due date field

I have modified the following script to display my ReminderDate field in red if the date is past and also the feedback field is false. Before implementing this and because I am a novice in jslink/...
1
vote
1answer
987 views

JSLink field value form Display Form automatically includes a <div dir=“”> element

I am using JSLink to override a TextArea column on SharePoint 2013, when I am trying to get the field value using ctx.CurrentItem[ctx.CurrentFieldSchema.Name] on display form, it warps the value with ...
0
votes
1answer
292 views

Filtered Views, URL's and the 5000 view limit

I've got various issues around the filtered views, one of the biggest problems is that I have a library that was indexed after it reached the threshold, meaning that any filtered views I create will ...
0
votes
1answer
93 views

Why javascripts referenced in JSLink are cached by browser (max-age=31536000)?

Context Recently, I noticed that browsers cache the javascript files that have been referenced from the JSLink property of a OOB list form. Analyzing the network traffic with chrome dev tools, I can ...
0
votes
1answer
473 views

JSLink Error 404

After deploying a JSLink file to add a button to a list view, I'm getting the following error when expecting the page in Chrome developer tools. using the following to reference the item ~...
0
votes
3answers
128 views

How i can set the “Due Date” field (on the fly) to be equal to Today date, when the “Status” dropdown list is changed to “In progress”

I am working on an issue tracking list inside SharePoint enterprise server 2013, where it contains these fields:- “Due Date” Item status Now our customer, asked us to implement this capability:- ...
0
votes
1answer
271 views

jsLink Nested Group Count returns Undefined

I have a jsLink working to display the groups and counts for a grouped list view, from here: js link group count list SharePoint 2013 But, my list has nested groups and the count for the children ...
0
votes
1answer
155 views

Filter out items based on metadata using js link

I have a document list for a project site. I have views created for each team. I also have four categories of documents for each team. I'd like to be able to have multiple instances of the list on ...
2
votes
1answer
187 views

What is the best way to add JSLink inside form tag

I am trying to add JSLink insided for tag in my SharePoint Hosted App, Here is Form tag code <Form Type="NewForm" Name="{878B105CA-A7O8-7C28-HD7F-5B0DCBA7DSA}" SetupPath="pages\...
0
votes
1answer
642 views

JS Link and CSR: Error After Filtering and Viewing/Editing

I have a *.js to color code my rows according to the value of the column Status. It is working very fine UNLESS one filters any column and views/edits an item. After exiting the item view, the ...
3
votes
1answer
254 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="...
0
votes
1answer
94 views

Include jslink in newform when a list is saved as template

I have created a list and in the newform I have added a jslink in it. Then I have saved this list as a List template to create other lists based on it. When I create a new list based on this list ...
7
votes
1answer
554 views

When JavaScript runs

Working on an overview of all possibilities of adding JavaScript. Can someone confirm Custom Actions run **after JSLinks** By execution order: Page Scripts using <script> tags or scriptlink ...
6
votes
1answer
2k views

what are the differences between JSLINK and Client Side rendering in SharePoint Server 2013

I have read many articles about client side rendering & JSLINKs but i am unable to differentiate between these two topics. now I have used JSLINK to implement 2 things inside my SharePoint server:-...
2
votes
2answers
2k views

Color code due date field if 6 months before current date

I have this specific requirement to color code the due date field if it's value is less than 180 days (6 months) compared to today's date. Is this possible with Javascript/JSLink ? Thanks
1
vote
2answers
924 views

Highlight Sharepoint List based on condition

I have the JSLink function below which I copied about 99.9%. But when I run it for my List, I get the following error. It doesn't seem to know the what the listItem is. Could someone please explain ...
1
vote
0answers
68 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 ...
4
votes
0answers
242 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 ...
6
votes
1answer
411 views

(ClientSide) set/update JSlink to CSR files for (all) WebParts, Views, Fields

Working on iCSR.github.io to make CSR development a bit easier. I now want to make it as easy as possible to set the JSlink connections on WebParts, Views or Fields. I have code snippets to do it ...
1
vote
1answer
496 views

sharepoint modal dialog not working

I am trying to display a list items's content (body column) when you click on the title in a modal dialog box. If I fill the modal function with nonsense text, it works fine (for example, title: "...
1
vote
0answers
128 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 <...
3
votes
2answers
2k views

Using JSLink with Document Set Contents web part

I'm following this tutorial on how to use JS Link to do some custom formatting to my list views. And it is working well. However when I go into my document sets the contents of the document set are ...