Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [client-side-rendering]

Client Side Rendering in general is a technique to offload part of the HTML content rendering workload from server side to the client's browser. In SharePoint 2013 JavaScript-based CSR templates partly replaced XSLT (remember, you can still switch to server rendering in web part properties).

0
votes
0answers
10 views

Using CSR to hide field on list view but show on quick edit view

Is it possible to use the "ShowInGrid=True" element of the URL to act as a trigger for show/hiding a field in a datasheet view? The below code that will hide it nicely on the default allitems view ...
1
vote
0answers
13 views

Create a replica of the list from root site to subsite using JSOM Approach

we have requirement to copy the list items from root site list to the subsite list using JSOM/Rest Api Below are the reasons for which we are going through this option ' Our environment does not ...
1
vote
1answer
47 views

How to highlight font color of task item to red for overdue task

In SharePoint online task list, I am using below code to highlight a row in yellow if task is overdue: <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></...
0
votes
2answers
20 views

JSLink Was Rendering Then Stopped

I have two JSLinks on Custom List Webparts on my page -- one for a bootstrap slider, which is working fine continuously, and one for an announcements webpart. The announcements webpart was working ...
0
votes
1answer
16 views

Programmatically add multiple xslt list view web parts pointing to specific subfolder within a sharepoint library

I have a list of items linked to a library in sharepoint. I have created a custom rendering logic for list items and would like to add to each item a xsltlistviewwebpart pointing to a specific ...
5
votes
2answers
55 views

CSRListForm and PreSaveAction or PreSaveItem

I've used PreSaveAction successfully in the past, but now I'm working with a CSRListForm and neither one of these will fire off. Even if I use just a simple alert message. I know the CSRListForm ...
0
votes
0answers
28 views

SP 2013, Edit Form “Save” button isn't working

SharePoint 2013, Edit Form "Save" button isn't working. I have a button on my home page that links to the form. I did use Client Side Rendering to create the button on a field in my list. Any ...
0
votes
1answer
17 views

How to avoid errors filtering and paging list views on pages with multiple webparts

Consider a situation where you need to display multiple list view web parts on the same page and retain most of the usual functionality like paging, sorting and filtering correctly. When you build ...
0
votes
0answers
32 views

How to hide/show view columns in SharePoint list view

I am playing with Document Set in SharePoint where document set's documents takes default view. However, I dont want to show few columns (e.g. 'Status', 'Salary' etc.) in default view but want to ...
0
votes
1answer
62 views

Color code the SharePoint list column value based on a condition?

I know this question has been asked and answered but I am new to CSR and I do not even know how to begin to implement this solution. I have tried to use the solution at this link with no success. ...
1
vote
1answer
200 views

PreSaveAction for Quick Edit Mode

I have build some scripts running in the PreSaveAction function for example to validate some data or conditionaly send an email via ajax call. Now I need this functionality when the user creates a new ...
0
votes
1answer
46 views

Adding a new control in New/Edit form using CSR display templates

I am planning to attach a attachment control in my newform and edit form using CSR display templates. i was able to add the control in the page but it is repeating (screenshot for the same). How can i ...
0
votes
2answers
156 views

Attachment Control in Newform and Edit form of a list Using Jquery

Has any one tried inserting Attachment control in Newform and Display form using Jquery with out going for Custom forms from Designer. I know we can add an attachment control through designer. When i ...
1
vote
1answer
60 views

SharePoint Online, JSOM, 'ObjectSharingInformation is not defined'

How do You use ObjectSharingInformation in javscript? I get Uncaught ReferenceError: ObjectSharingInformation is not defined My function is something like function getSharingDetails() { ...
1
vote
1answer
103 views

SharePoint Online CSR, make clickable link in Datasheet View

Want to create direct link to Document Set folders, so found and changed CSR that do this. Works well, but not in Datasheet View (it is not clickable in Datasheet View). Tried to change column types ...
1
vote
0answers
24 views

Custom Web part with filter that doesn't cause postback

I have a custom Content Query Web Part that currently pulls in events into a custom calendar, by month, with selectable filters that filter event listed on the calendar by a field value on the Event ...
0
votes
1answer
72 views

CSR to change item link for certain file types

First off, I am rather new to CSR so I apologize for anything stupid to come! This is Sharepoint Online. I'm trying to use CSR, on a custom page with a filter and list view web part (doc library), ...
0
votes
1answer
30 views

CSR and XSLRender flag in custom `SPField`s

I'm trying to understand what the XSLRender flag in the SharePoint-Enterprises CSR stands for, did not find anything on the web. Does anybody have an idea/explanation? Where does it come from? EDIT: ...
1
vote
0answers
25 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 ...
1
vote
0answers
38 views

Display webpart side to side on DispForm / EditForm

I have edited my disp and edit form from a list to display a second webpart inside (parent-child list) and they are, as usual, displayed one above the other. I would like to have them side by side. ...
1
vote
1answer
71 views

Running custom function before SharePoint renders page

Some Background I have a publishing site that presents documents with stylized icons using some custom display templates and views (with CSR). Document icons are rendered using fontAwesome classes ...
0
votes
1answer
120 views

JSLink code to filter lookup columns work on a Custom list's new and edit item form but not on document library edit item form

I am using JSLink code to filter lookup column to show relevant values. The same code works well on a custom list's edit form but breaks on the document library's edit form. I checked the ID of lookup ...
0
votes
1answer
161 views

Sharepoint Online: Display publishing image and created by fields in dispform.aspx via csr

I've applied a csr js file to overwrite the rendering of dispform.aspx for a simple list. This displays every field correctly except for a publishing image and the created by fields which return "...
0
votes
1answer
100 views

SPClientTemplates.TemplateManager.RegisterTemplateOverrides does not run first time in IE, works on refresh

So I have some JS that is supposed to take a related list, remove the ID column, auto-populate it, remove the hero links, and remove the add column button. In Chrome and Edge, it executes this ...
1
vote
1answer
226 views

Modifiy the value of a choice field with javascript

I am writing a code which tests the due date of my task and then the value of my column "emailcheck". This last one is a Yes/No column, by Default set on No, I will need it in to know if I sent or not ...
1
vote
1answer
266 views

Two list views of same list in a Page. Applying JS link - CSR to create charts using Charts.js

Following this Article Scenario: To create charts. Using chart.js + jquery + Demochart.js file I have modified using the one given in article. I have two list view webparts in same page. So I apply ...
0
votes
1answer
101 views

Clear radiobutton list selection using jquery

I would like to clear Radiobutton list selection once user click the button. I have tried the following code but clears the selection in browser. When I access from backend(C#) selection is there. It ...
0
votes
1answer
411 views

How do I enable CSR to return the default rendering for a Select column in a list view web part that provides filter values to other list web parts?

I'm attempting to override the rendering of a Select column in a list web part that provides filter values to another list web part. In the code below, I'm attempting to not display the Selector icon ...
1
vote
1answer
343 views

How to use Sharepoint CSR to conditional hide row

Team, I've got a list to record a shift roster. I have two Date/Time columns recording (1) Start of the shift and (2) End of the Shift. I want a view that only shows who is rostered on right now! I ...
3
votes
2answers
53 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 = {}; ...
1
vote
1answer
61 views

Adding a SP.FieldUserValue into the Visitor/Member/Owner group of a site

I'm creating a website based on what a user submits in a form 3 fields are reserved for the 3 types of default groups that you're asked for when creating a subsite manually : - Owner - Members - ...
1
vote
1answer
366 views

Need help changing cell background color based on the content of the cell using CSR

Here is a link to what I'm trying to do: Sharepoint CSR JSLink – View Cell Customization. It's my understanding that it should work basically as is with only minor updates to the switch to fit my ...
0
votes
2answers
64 views

Javascript in CSR, Slice & Substr

I have the below function,which colors Title column in SP Online. I want to extract just the last 2 characters from "Period" and use it in the Switch case. I tried Slice,Substr function but both didn'...
0
votes
2answers
718 views

Conditionally hide a metadata field based on user's permission

I am working on an office 365 online SharePoint site collection. I have added a custom list inside my site collection. The site collection has the built-in group named "Owner", so is there a way ...
2
votes
1answer
183 views

Customize Launch Behavior Choice Options

In SharePoint 2016 Promoted Links in Launch Behavior column I wanted only 'page navigation' and 'New tab' options. So I removed the 'Dialog' option from choice. After this I added items in the ...
1
vote
0answers
96 views

How to focus to a web part in page

I have a task to zoom in to a web part in mobile device. Our master page and page layout isn't mobile ready, but we provide users access to some SharePoint pages. I tried to use this to focus (or ...
0
votes
1answer
1k views

Color code sharepoint Online calendar view [duplicate]

I have a custom list in which i have created a calendar view. I want to color the calendar items based on a choice column. In SP2010, I had a JavaScript doing this but in SP Online, I am not able to ...
0
votes
1answer
48 views

Overriding text in datatable with icons

In reference to this page, I'm trying to replace the text with icons but not getting the desired results. function mySuccessHandler(data) { try { var dataTableExample = $('#table_id').DataTable();...
1
vote
2answers
374 views

SharePoint List: Modify text color based on choice in list view

List Item: Choice - Selection I'd like to change the text color based on the selection. For Example. Column Name Red (choice 1, red txt) Blue (Choice 2, blue txt) Yellow (choice 3, yellow ...
0
votes
1answer
414 views

How to use JSLink (CSR) for multiple views of same list in Same Page?

I have a page with 2 views of same list. When I use the JSLink to render one of the column (request_id) which is present in both the views, in one view JSLink is working fine, but on the second view ...
2
votes
2answers
2k views

Get full user details from person field in javascript

How do I get the "User Information" for a specified user using JSLink? With CSR, I can get some user details from ctx.CurrentItem.PersonField[0]. This gives me an array of users which are selected ...
2
votes
1answer
330 views

How to add SPFx client side webpart to MasterPage

I have a webpart that is developed using SharePoint Framework. This wepart should appear across the pages in the site collection. I know that we can add server side webparts in master page. How can we ...
1
vote
1answer
159 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 ...
0
votes
3answers
436 views

How to display additional fields from Lookup table with JsLink

I have a list (Jobs) with a lookup field (Market) to another list (Markets) which contain the Market details (city,state,zip). In the View display, I want to show the Market name from Jobs as well as ...
0
votes
2answers
140 views

Quick edit list table row has no id, only iid, how do i find the element?

I'm trying to add conditional formatting to my list, but when i enter quick edit, my code wont work because it uses the id on the table row to change the color and for some reason the table rows in ...
0
votes
1answer
65 views

Hide list items based on results from another list (limited options)

Team, I have a very restricted Sharepoint environment; no access to designer no access to Filter webparts workflows limited to (1) Approval (2) Collect Feedback (3) Collect Signatures (4) Three-...
0
votes
1answer
79 views

CSR list animation removes formatting, any way to keep both?

I have been struggling with keeping the formatting on my list. When i filter, search, or sort, my formatting is removed from the affected rows. After some googling i found a solution; removing the ...
2
votes
1answer
362 views

SharePoint CSR causes an error on the list view

I am having the following problem. I wrote a custom JavaScript to color list view rows using the OnPostRender event. It works fine and all until the following steps are executed: Open the list view (...
1
vote
3answers
1k views

jQuery not working on dynamically loaded content

Newbie here looking for advice. I've looked through a ton of items similar to this and nothing is solving my problem. Some of my jQuery is working, some is not. I assumed it was due to the order I was ...
0
votes
1answer
100 views

Ribbon not initially rendered when using CSR in conjuction with React and TypeScript

we have designed a few custom fields using CSR, TypeScript and React. On our AllItems.aspx, we use this to render a link for a "cross-site" lookup field which is really just a text field holding a ...