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
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
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
1 vote
2 answers
514 views

highlight row on current user exists in a people or group column in a list view

I need to highlight a row in a list view, if current user is selected in a people or group field in this view, directly, or using SharePoint group. I really would like to do this using JS. Is this ...
Igors Moskalcovs's user avatar
4 votes
1 answer
858 views

Run JS link file on just 1 web part

I have a page with 2 web parts. the 2 web parts are the same list just imported in different views. i have added a JS link file to 1 of the web parts using the edit web part properties miscellaneous ...
derek's user avatar
  • 307
0 votes
1 answer
336 views

Asynchronous update OOB field value with jsLink

In an edit form, I want to generate/update the filename of a document based on another field in the form. How to set the filename value after the other field changed ? At this point, I don't have a ...
Steve B's user avatar
  • 7,456
1 vote
2 answers
194 views

SharePoint JSLink or Inject Javascript

I have an SharePoint hosted app with a list(test). On the Lists/test/AllItems.aspx is there a way to inject JavaScript file with referenc to thirds party Javascript files like datables etc . Issue ...
user64002'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
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
2 votes
2 answers
2k views

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

I was working with JS Link in Sharepoint and managed to render a custom list. Here's a brief extract from the code: context.Templates.View = RenderBodyTemplate; SPClientTemplates.TemplateManager....
Henri Korpela's user avatar
2 votes
3 answers
234 views

Add a message inside my Create and Edit list forms, which explain that "*" mean the related field is mandetory

I have a team site collection , which have 6 custom lists. now our customer ask us to add a message when users create/edit list items , to exaplin what does the "*" means, something as follow:- now i ...
John John's user avatar
1 vote
1 answer
2k views

How i can disable a column from the lists' Quick Edit Grid using a JSlink which is linked to list view webpart

I want to disable the Title column from the Quick Edit grid, inside certain web-parts so i did the following steps:- 1- I went to a list view. 2- Edit the page 3- Edit the web part. 4- Under the "...
John John's user avatar
6 votes
4 answers
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 ...
John John's user avatar
1 vote
1 answer
85 views

Optimizing JSLink Script

I'm using JSLink to color code similar columns in a list view. I need set it up to color code 20+ columns, and the script I'm currently using seems a bit redundant. Is there a more optimized/less ...
commandqueue's user avatar
1 vote
1 answer
243 views

JSLink -- how to suppress the standard rendering of a column label on a form

In producing a JSLink custom rendering for a particular field (I use Fields:, EditForm and NewForm templates), I seem to have gotten the field's default name rendered "for free" as its label, but I ...
Josh Korn's user avatar
  • 547
0 votes
2 answers
3k views

Is there a way to set JSLink for a Content Type?

I need to set up a complicated display template that's essentially attached to a single field; this field appears on 40+ sites in the same site collection, and I want it to do the same thing on all ...
Josh Korn's user avatar
  • 547
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
0 votes
1 answer
683 views

readonly fields on the basis of logged in User using JSLink

I am unable to make the fields readonly in EditForm.aspx on the basis of logged in User. The ctx.CurrentFieldSchema.FieldType throws an error "Cannot read property 'FieldType' of null" Below is the ...
Akansha Madhvi's user avatar
0 votes
1 answer
2k views

Unable to call SPClientTemplates.TemplateManager.RegisterTemplateOverrides from Context.executeQueryAsync in JS Link

exceute SPClientTemplates.TemplateManager.RegisterTemplateOverrides from Context.executeQueryAsync Success Below is my code (function () { var isCurrentUserInGroup; var flag=false; var ...
Akansha Madhvi's user avatar
0 votes
1 answer
1k views

Custom Lists - Conditional Formatting Cells based on Dates on SharePoint2013

So I was tasked with creating a conditional to highlight an item red when the date is overdue. With some help from you guys I was able to produce a JSLink that highlighted the entire row when an item ...
iamthehxc's user avatar
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
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
3 votes
3 answers
238 views

JSLink Loop ends after first row

I'm hoping that you can help me with this issue. I've been wrestling with this one for days. I've been following everyone's posts for OnPostRender. I want to change the background color of the row ...
HarryT's user avatar
  • 43
1 vote
1 answer
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 ...
Adi's user avatar
  • 103
3 votes
3 answers
5k 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']...
hartski's user avatar
  • 33
2 votes
1 answer
701 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 ...
SandeshR's user avatar
  • 1,992
2 votes
2 answers
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 ...
SandeshR's user avatar
  • 1,992
3 votes
2 answers
738 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 ...
Khaine775's user avatar
  • 221
3 votes
1 answer
1k 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&...
Michael Colbs's user avatar
1 vote
1 answer
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 ...
Justin Demers's user avatar
1 vote
1 answer
962 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 ...
SandeshR's user avatar
  • 1,992
1 vote
1 answer
647 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 = {}; ...
Maureen's user avatar
  • 707
0 votes
1 answer
105 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....
dev.Manderson's user avatar
0 votes
2 answers
348 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. ...
Ravindra's user avatar
  • 436
0 votes
2 answers
10k 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 (...
Venkatesh Kadiri's user avatar
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
3 answers
627 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 ...
tsap's user avatar
  • 465
0 votes
3 answers
397 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 ...
Brice235i's user avatar
0 votes
1 answer
458 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 ...
user avatar
0 votes
1 answer
418 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 ...
Jason's user avatar
  • 583
2 votes
1 answer
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, ...
wheeler's user avatar
  • 443
1 vote
1 answer
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 ...
flor1an's user avatar
  • 220
0 votes
2 answers
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 ...
Jarle Langemyr's user avatar
0 votes
1 answer
855 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; ...
rockxl1's user avatar
  • 43
0 votes
2 answers
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: { ...
Carlos's user avatar
  • 319
1 vote
1 answer
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....
Sandmann2111's user avatar
0 votes
0 answers
430 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 ...
user avatar
1 vote
2 answers
191 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 ...
T.Nate's user avatar
  • 13
0 votes
1 answer
719 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: /...
Thomas's user avatar
  • 980
0 votes
2 answers
1k 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 ...
Dinerdo's user avatar
  • 739

1 2 3
4
5
9