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).

Filter by
Sorted by
Tagged with
0
votes
1answer
26 views

SharePoint 2013 - format webpart list column text not based on a condition

I would like to change the color and text size of a calculated column in a SharePoint 2013 not based on any condition. Searching online I have only been able to to find ways of applying conditional ...
0
votes
2answers
41 views

Change Column background color and text color

I am trying to change the background color of a specific column in this webpart because it's using percentage and not text I can't figure out how to get sharepoint 2013 to change the entire column a ...
0
votes
1answer
40 views

sharepoint 2013 list expand/collapse multiple line text column

I'm desperate and need your help on this script. I have a "multi line text" column named "Comments", and i added the following script into a script editor but it is not working for me. could you ...
0
votes
1answer
22 views

Client Side Rendering

I have followed the guide (https://www.c5insight.com/Resources/Blog/tabid/148/entryid/653/how-you-make-sharepoint-announcements-grab-attention-easily-using-csr.aspx) to implement some client side ...
1
vote
1answer
20 views

How to customize Modern forms? Field Customizer replaced CSR for views but what about forms?

In classic we had CSR (JSlink) for views and most of the forms. Field Customizers could replace CSR for list views, as described here: Migrating from JSLink to SharePoint Framework Extensions But ...
0
votes
0answers
12 views

Sharepoint 2013, JS link people picker field not working saving for multiple users

I am using below CSR code to set peoplepicker value to multiple person. I have multiple users to be assigned to my peoplepicker field. The code works when i pass current user, but it do not work for ...
1
vote
1answer
57 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:...
0
votes
1answer
40 views

Conditional Formatting based on whether or not time is present

Is there a way to set background color conditionally ony when data is present? Only when someone sets a time due it shows up in the column and I want to make that more visible. I am familiar with ...
0
votes
1answer
39 views

How to insert list items using JavaScript Object Model in SP

I am trying to insert list item's value through JavaScript object model in SP. When I call set_item('fieldname','Title'), it throw error "c.set_item is not a function". How to successfully Insert a ...
0
votes
1answer
61 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
14 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
79 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
22 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
38 views

Change background color on list view selector

I have a few list views on SharePoint 2013. I want to set background color on the list view selector or set font color. How to do it? Thanks!
0
votes
1answer
19 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
69 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
72 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
25 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
38 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
84 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
377 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
54 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
300 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
96 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
124 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
25 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
90 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
33 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
34 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
39 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
94 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
155 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
212 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
151 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
353 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
290 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
136 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
2answers
557 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
387 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
68 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
75 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
424 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
68 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
829 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
223 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
115 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
53 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
452 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
500 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 ...