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
25
votes
8answers
33k views

Client-Side Rendering/JS Link documentation?

Has there been any sort of documentation or anything like that released for SharePoint 2013 Client-Side Rendering/JS Link? Anthing unofficial? Any dates for when documentation might be released?
17
votes
6answers
34k views

Sharepoint 2013 JS Link return default field rendering

I got a very strange problem. I need to return default rendering for UserField (PeoplePicker) for some SP users with current user, and show read-only field with current user for others. In other ...
4
votes
1answer
4k views

Do not apply CSR Override in QuickEdit Mode

I have been working from a few different examples and nearly have a jslink file working with CSR overrides such that the 'title' value is used in the 'name' field and the title column is hidden. The ...
1
vote
1answer
103 views

Color Coding List Item by Web Part based on value

I am currently trying to get color coding on a list to highlight good medium and bad properties. I have tried to follow the examples shown here for color coding: SharePoint 2013 Client Side Rendering:...
11
votes
8answers
21k views

SP.ClientContext is always “undefined” in JSLink functions

I'm trying to execute CSOM functions as part of a JSLink extension to override rendering of a Lookup Field. Problem is every time I try to access SP.ClientContext it returns as undefined I have ...
5
votes
2answers
12k views

Filter out items in list view using jslink

I have a list view, containing GUIDs, where I want to filter out some items depending on the result of a REST call made in the onPreRender function in my JSLink. The REST call fetches GUIDs from ...
4
votes
2answers
2k views

Targeting specific list with Client-side rendering

I've read several walkthroughs on client-side rendering (CSR) and JSlink, and the methods to target only one list on a page instead of all lists. I understand that I can target using two things: ...
6
votes
4answers
2k views

Can force the “Title(linked to item with edit menu)” column inside my list view to reference to another URL

I am working on a custom list, and inside the list view i am showing the Title(linked to item with edit menu) column. currently when users click on this column they will be redirected to the item ...
3
votes
2answers
24k views

Can I filter a Web Part list using parameters from the URL?

In my rich content area I've inserted a Pages Web Part (to show a list of pages in the subsite). I'm using JS Link to customize the presentation of the list. Can I pass a parameter to the page and ...
1
vote
2answers
9k views

Using Different BaseViewID values for multiple JSLink on a single page

I've been working with JSLink customizations for a couple different Custom Lists we have and they've been working fine when on a page by themselves. Recently I needed to include multiple Custom Views (...
7
votes
7answers
4k views

JSLink (js)file is updated, but still can't see any changes, maybe caching?

I am using SharePoint 2013 online (Office 365). I am following some JSLink tutorial where I am showing indicator icons in columns. It looks like the .js file is working, but when I change the file and ...
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
2answers
3k 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
1answer
690 views

Formating list with JSLink - “like” button

I am trying to reorder casual sharepoint list view which looks like this: To look like this: I am using JSLink and I have no problem with normal text fields like "Title" or "Description" but I dont ...
1
vote
2answers
3k views

Can I change the display name of column in a listview using JSlink

I've a requirement to change the display name of a column in only one view, I've to show 'Responsible' instead of 'Responsible Person'. Is this possible by JSlink ?
20
votes
8answers
23k views

Customing the newform.aspx of a list using jslink in SharePoint 2013

How do I customise the newform.aspx of a list in SharePoint 2013 using JSLink? A lot of examples seem to be for customising list views. I can't find anything that explains how to customise the new ...
10
votes
1answer
4k views

Setting JSLink SharePoint online

Has anybody successfully set the JSLink for SP Online? I usually set it through Powershell on the view itself but that Command isn't available Online http://technet.microsoft.com/en-us/library/...
5
votes
2answers
2k views

Customize a view of recurring calendar events using client side rendering (JSLink)

I'm trying to apply CSR to a calendar-view. This seems not to be working. In fact the file specified in JSLink is not loaded at all. As a basis I'm using the standard "Current Events"-view which ...
2
votes
3answers
7k views

JSLINK for multiple list views

I have a list that i used for many view as a web parts in the home page, so all the view are from the same list. what i want is to customize my view in a specific design, so i have to apply a JSlink ...
2
votes
3answers
7k views

Using JSLink to manage and output list groups and items

so I am currently using JSLink to change the look and feel of my List view, but am getting a little stuck in getting the HTML hierachy of my elements right. This is my current code... function ...
2
votes
4answers
5k views

Set the JSLink property for all list forms in FeatureActivated

Is it possible to update the SPForm.JSLink property for the forms (Display, New, Edit) of an existing list in the when a feature is activated? I have tried the code below, but it seems that the ...
3
votes
2answers
1k views

How to add resources when using JSLink

I am using JSLink to change view of a custom list using this code, (function () { var overrideCtx = {}; overrideCtx.Templates = {}; overrideCtx.BaseViewID = 2; overrideCtx....
2
votes
2answers
2k views

Can JSLink be used to add a new column in the list view?

I have been studying JSLink and its possible uses and have implemented some examples. But all of the examples work by modifying value in the existing column in a list view. Can we use JSLink to add a ...
5
votes
2answers
6k views

How to apply JSLink to List's New Form in Visual Studio?

I have content type say "Departments" and applying to the list named "All Departments", there is one field in content type that I want to apply js link to render it differently I found some solution ...
3
votes
2answers
777 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/...
2
votes
4answers
12k views

Custom JSLINK rendering template - how do you get ajax paging working?

So I followed this post to implement paging in my custom JSLINK rendering template, and got that working great. The only downside to it is that the paging actions are full page post-backs whereas on ...
8
votes
1answer
11k views

JSLink - Is CSR PostRender supposed to fire once per field?

I have been working on a CSR script for the New / Edit / Display forms of a list. I am attempting to use OnPostRender to perform an action after all fields on the form have been rendered (hide a ...
5
votes
2answers
2k views

Catch on drop event in document library

I am trying to write a JSLink file that hooks to the event "ondrop" (or whatever it is called) from a document library. The reason behind this is, we want a jquery dialog to open when someone drags a ...
2
votes
1answer
3k views

Make List Item Attachment link clickable with JSLink

I am generating a link to a List Item's attachments using the following code. It works perfect, but it is slowing down the loading / paging of my List view significant. Does anybody know of a more ...
5
votes
3answers
2k views

Where to store JSLink files?

I have a JSLink file which renders some additional information (e.g. a graph) for a out-of-the-box task list. I want to give anyone in my company the possibility to make use of this JSLink file. Where ...
5
votes
2answers
2k views

Client Side Rendering with Async dependencies

In my display template I want to render a field in different ways based on the user's group membership. The information about the group membership comes from an async ajax call (jsom or rest) What I ...
4
votes
1answer
3k views

Create Edit Control Block (ECB) on View with JSLink

I have a question about ECB: In Sharepoint 2013, how to create Edit Control Block (ECB) in view with JSLink. I use JSLink to modify the default view, but I can't display the ECB context menu with "...
3
votes
2answers
19k views

How to handle multiple calls to executeQueryAsync synchronously?

I have a custom list to which I am applying JSLink to NewForm.aspx. The list where JSLink is applied is : XXX and in the JSLink I am querying data to YYY from the list YYY there are two fields ...
2
votes
1answer
2k views

How to apply JSLink to the custom new form of list?

I have created custom new form for list using SharePoint designer, to customize the behavior of OOTB SharePoint. The functionality which I wanted to achieve is complete but I am not seeing the option ...
2
votes
1answer
524 views

Show list items in custom format like Repeater or DataList using CSR

Am quite new to CSR. WE have requirement wherein we have to show list item values in a non tabular format (unlike grid view).Data should display like Repeater or DataList. Update: Generally we apply ...
2
votes
3answers
5k views

Is it possible to refer to a field hidden in current view from JSLink attached to current view?

I have the following JavaScript code attached to List's JSLink property: (function () { var coloringFieldContext = {}; coloringFieldContext.Templates = {}; coloringFieldContext....
2
votes
1answer
4k views

Hidding Forms; fields using standard jquery versus using JSlink. which approach is better

I want to hide some fields from my Edit & New forms, and i need this to apply to all the subsites. now if i hide the columns from the Content type they will appear again when users modify these ...
0
votes
3answers
3k views

JSLink set in list definition (schema.xml) not being loaded

I have created a custom list definition and detailed in many articles across the net I have specified my file in the JSLink property of the view. For some reason it is no longer working. <JSLink ...
8
votes
2answers
2k views

What are the Type.registerNamespace advantages over standard JavaScript methods?

Now I dive deeper into the world of .Net developers I notice more and more Microsoft ways of doing things unfamilair to me as a (once LiveScript) JavaScript developer. I see PnP and other blogs using:...
5
votes
2answers
4k views

CSR is also applied to a Group By header in a ListView

The only decent blogs mentioning CSR and Grouping are: http://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views (must read) http://jsuhail.blogspot.nl/2014/09/client-...
3
votes
2answers
16k views

Open List Item in Modal Dialog from SharePoint List View Page

I have SharePoint All Items Custom List View which I would like to customize using JS Link feature. Currently whenever user clicks on "Title" link on any item it opens Listform.aspx with detail ...
3
votes
2answers
5k views

JSLink Client-side rendering

I need to render some fields client-side, I followed this guide: Client-side rendering but this code is not working: (function () { // Create object that have the context information about the ...
3
votes
2answers
97 views

How do I load user's data before JSLink renders the form

Below is my simple code to render the "Activitydescription" field in the newform.aspx. This is working. (function () { var ActivitiesListContext = {}; ActivitiesListContext.Templates = {}; ...
2
votes
2answers
6k views

JSLink: Is it possible keep the default list view header with column headers for filtering?

I am rendering a view with JSLink. Rendering is fine but is it possible keep the default list view header with column headers for filtering? I have tried this code in my dev environment. Issues: ...
2
votes
2answers
5k views

SharePoint 2013 JS Link edit form control

I have below code snippet to make fields in a SharePoint list edit form read only under certain conditions. This works fine but what I would like to know is how I can return the edit control for a ...
1
vote
1answer
3k views

SharePoint 2013. JSLink (CSR) for field Type=“User” on EditForm

How to create custorm render for field type="User" on EditForm? I need to replace standart peoplePicker control with my custom render. Code below work without exeptions, but don't set 'Sponsor' field....
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
1answer
1k views

In SP Online, how to return the default HTML of a lookup field when overriding the Item Template in a list view

I've found various methods to return the default values for the field template override, including lookup, but I have been unable to find or successfully implement a method to do the same for fields ...
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....
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 ...