Client Side Rendering in List Display Form

I would like to use CSR to customise a list display form.
I can't seem to find any examples where people have done anything more than alter how a particular field is rendered in a display/new/edit form.  I would like to do things like alter the header, footer, the order in which the columns are displayed and
the layout of the form overall itself.
Playing around I notice that when I change the "CSR Render Mode" for a display form web part to "Custom (CSRCustomLayout)" the Header and Footer events fire, but then the form seems to output the labels (with no data next to them) and
then then dumps all the data after the labels.
Also the pre and post render methods also do not fire unless it is in Custom layout mode.  Putting it back to Standard only runs the field level override.
What is the correct way to go abou this?  What are those CSR Render Modes for?
Thanks,
Richard

Richard,
Take a look at this part from Martin Hatch's developer series on List views. He covers off the new and edit forms in this one.
http://www.martinhatch.com/2013/08/jslink-and-display-templates-part-3.html
Paul.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

Similar Messages

  • Show the Read more link in the list view webpart using Client side Rendering

    Hi,
    I have a share point list name as Team.It contains two columns like Role(single line of text) and Name( people and picker).
    I want the display the list view webpart like below format using JS Link/Client side rendering concept.
    If list contains more than 3 items (display like this)
    >TeamMemberName1
    >TeamMemberName2
    >TeamMemberName3
    Readmore... (Read more link should expand all the team members)
    If list contains more than 3 items (display like this)
    >TeamMemberName1
    >TeamMemberName2
    >TeamMemberName3
    Could you please provide the code.It is very urgent for me.
    Thanks for the help!!!

    (function () {
        debugger;
        //Create our Namespace object to avoid polluting the global namespace
        var pfh = pfh || {};
        //Define our Header Render pattern
        pfh.renderHeader = function (ctx) {
            var headerHTML = "<ul>";
            return headerHTML;
        pfh.renderFooter = function (ctx) {
            //Define any footer content here.
            var footerHTML = "</ul>";
            return footerHTML;
        pfh.CustomItem = function (ctx) {
            var itemHTML = "<li>" + ctx.CurrentItem.TeamMemberName[0].title; + "</li>";
            return itemHTML;
        //Define any code/function that needs to be run AFTER the page has been completed and the DOM is complete.
        pfh.PostRenderCallback = function (ctx) {
        //Define the function that will register our Override with SharePoint.
        pfh.RegisterTemplateOverride = function () {
            var overrideCtx = {};
            overrideCtx.Templates = {};
            overrideCtx.Templates.Header = pfh.renderHeader;
            overrideCtx.Templates.Footer = pfh.renderFooter;
            overrideCtx.Templates.Item = pfh.CustomItem;
            overrideCtx.onPostRender = [pfh.PostRenderCallback(ctx)];
            overrideCtx.BaseViewID = 98; //Note: We're using BaseView ID 99 to match our override below
            overrideCtx.ListTemplateType = 100;
            SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
        //Now we load in our override to ensure that this Override is only applied to the intended ListView
        ExecuteOrDelayUntilScriptLoaded(function () {
            var OldRenderListView = RenderListView;
            RenderListView = function (ctx, webPartID) {
                if (ctx.ListTitle == "Test") {
                    ctx.BaseViewID = 98;
                OldRenderListView(ctx, webPartID)
        }, 'ClientTemplates.js');
        //Register for MDS enabled site otherwise the display template doesn't work on refresh
        //Note: The ~sitecollection tokens cannot be used here!
        RegisterModuleInit("/_catalogs/masterpage/Display Templates/csr_ovr_RenderListTemplate_Fixed.js", pfh.RegisterTemplateOverride); // CSR-override for MDS enabled site
        pfh.RegisterTemplateOverride(); //CSR-override for MDS disabled site (because we need to call the entry point function in this case whereas it is not needed for anonymous functions)
    I am using the above script to render the items.
    I am new to the CSR.
    Where do i need to include your script in my script.
    Please help on this.
    Thank you for reply sagar.
    Please note that i am not using content search webpart.

  • Client Side Rendering on Terminal Servers

    I’m having horrible printer issues on my Terminal Servers such as slow printing, slow to add printers, some applications load slowly because they are enumerating the list of printer (thanks Procmon), slow logons, etc. I'm trying to get Client Side Rendering
    (CSR) disabled. From what I can tell it still appears to be on. Terminal Server are Windows Server 2008 SP2 x86.
    On my print servers I have verified that all printers have Render print jobs on client computer unchecked. I have a Group Policy linked to the OU that the Terminal Servers are in that has
    Always render print jobs on the server set to enabled. Per
    http://blogs.technet.com/b/askperf/archive/2008/02/10/ws2008-client-side-rendering.aspx I have verified that on each Terminal Server in
    HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers the
    ForceCSREMFDespooling value is present & set to 1 so the GP is being applied.
    However I still have tons of entries in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\<SERVERNAME>\Printers.
    I have found KB958656 which seems to describe my problem that CSR is not being disabled. However one of the files it updates is older than a file that I have (win32spl.dll) & one is newer (printcom.dll).
    Printcom.dll in hotfix is 6.0.6001.22288 mine is 6.0.6001.18000
    Win32spl.dll in hotfix is 6.0.6001.22288 mine is 6.0.6002.18005
    Has anyone else seen this behavior & been able to get CSR disabled?
    Has anyone else had success with the KB hotfix mentioned or know whether or not installing it would causing any issues (since it has that older file)?
    Thanks in an advance to any input.
    Patrick Hoban
    http://patrickhoban.wordpress.com

    Alan/Patrick,
    Hi, sorry, went away on leave for a while so didn’t respond.
    Alan – our case was REG:112081612189183.
    For someone who has been dealing with MS support for about 20 years, this was the most disappointing of any support call I’ve ever had raised – to have the call shut
    down, without a perfmon trace, process explorer analysis, or hang dump analysis (of spooler) – and simply blame “3<sup>rd</sup> party drivers” without any proof – is utterly deplorable.
    Anyway, for anyone’s benefit who has similar problems – trying to do direct printing from RDS – I’ve managed to get a solution working. 
    Here are the details;
    A nightly print spooler clean-up script that;
    Stops the spooler
    Deletes the entire key under “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider”
    Re-creates the key (empty) and sets the value "RemovePrintersAtLogoff"=dword:00000000
    Note, this was vital. 
    MS support had recommended we set this to 1, along with some other keys (InactiveGuidPrinterAge, 
    InactiveGuidPrinterTrim) with specific values.  If we used these MS support recommended values, our RDS serer would not enumerate printers for more than 3-4 hours before requiring a restart of the spooler.
    Restart the spooler
    Map a printer (just to make sure it works)
    Clean up the USERS\.DEFAULT\Printers key on all existing servers
    There was heaps of crap here, the default user NTUSER.DAT was over 800MB in size
    Modify the security on the registry, using GPO to deny SYSTEM write access as below, to stop the crap writing here again;
    USERS\.DEFAULT\Printers
    Deny Set value
    Deny Create Subkey
    Run NGREGOPT on all servers to compress the DEFAULT and SOFTWARE hives back down.
    Even though we had deleted the crap from “Client Side Rendering Print Provider” and the DEFAULT user hive, the registry files were still large of course, and needed to be compressed to reduce
    paged pool usage.
    Note, make sure no users are on the server when this is run !
    With the nightly spooler ‘refresh’ and the registry security changes, we are no longer seeing any problems. 
    In addition the paged pool has gone down from 5GB to 1GB – which I believe was related to the registry bloat that had occurred previously. 
    Cleaning up the keys and using NGREGOPT has fixed this.
    In addition, I am running a spooler check script every 30 minutes on each of the 13 servers. 
    This script checks how long it takes to enumerate the printers for the specific test user. 
    If it takes more than 20 seconds, we get an alert.
    Since I have made the changes above, we no longer have any printing problems… touch wood.. even using HPD 5.4 for most printers, and other (RICHO) 3<sup>rd</sup> party
    drivers.
    If anyone wants the scripts (the spooler refresh or the check script) let me know on david.frith<at>glfconsulting.com.au
    ta

  • Client Side Rendering Yes or No

    Good Day,
    We have a RDS2012 R2 environment. We were not able to use the Easy Print Driver due to speed and now our printing environment is:
    1. All printers installed and shared off a W2k12 R2 File and Print server
    2. Appropriate printers are mapped via Group Policy upon a user starting an RDS session.
    This is working much faster than we were using the Easy Printer Driver, but I am wondering if it could be faster yet if we turn off Client Side Rendering which is on the Sharing Tab (Printer Properties) of the shared printer?
    Steve J.

    About 70 printers shared off of the file and print server, but that is the only thing that server is doing. I would rather have it do as much work as possible and leave the RDS servers to do their applications. Did I just answer my own question?
    If the end users are all WAN end users, yet the RDS servers and Print server are on the LAN, does either of these options mean more or less WAN traffic?
    Steve J.
    I think you did. :)
    As I understood it you aren't using any printer redirection, all printers are mapped in the session. If all end users are WAN users shouldn't matter since they connect to  a RDS Server and all printing is either happening on RDS Server or Print Server. 

  • RDS WS2012R2 and "Client Side rendering"

    Hello,
    Is it normal that the CSR key continues to populate even if the CSR is disabled (verified with 'Get-Printer -Full |fl')?
    BTW winprint is used for all the printers on the print servers, and non-microsoft monitors are deleted.
    Thx,
    Ludovic H.

    Hi,
    Thank you for posting in Windows Server Forum.
    If you disable this policy setting on a client computer, the client itself will process print jobs into printer device commands. These commands will then be sent to the print server, and the server will simply pass the commands to the printer. This increases
    the workload of the client while decreasing the load on the server. If you do not enable this policy setting, the behavior is the same as disabling it.
    This policy does not determine whether offline printing will be available to the client. The client print spooler can always queue print jobs when not connected to the print server. On reconnecting to the server, the client will submit any pending print jobs.
    In cases in which the client print driver does not match the server print driver (mismatched connection), the client will always process the print job regardless of the setting of this policy.
    More information.
    1. Disable Client-Side Printer Rendering
    2. Known Issues with Client-Side Rendering
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • Client-side Rendering and AIX

    Group,
    We're running a Server 2008 R2 Print Server.  Does anyone know if the Client-side Rendering option has any "gotchas" when receiving jobs from an AIX server?
    Thanks,
    Jason
    Jason Riker

    Nope.  I assume the AIX machine renders the docs there so there is no Server Side Rendering required.
    This is a setting on the machine sharing the printer that lets Windows Vista and greater clients know they need to render the document. XP and non Windows machine have no clue about this setting.
    Alan Morris formerly with Windows Printing Team

  • Disable Client Side Rendering on 2008 R2

    Hi guys, I have the following:
    several 2008 R2 RDS servers
    connecting to queues on a windows 2008 SP2 x64 print server
    print queues running the HP Universal Print Driver v 5.3
    I'm trying to offload rendering to the beefy print server. To test this, I setup a test queue using the HP UPD and turned of the 'Render Print Jobs on Client Computer' setting on the queue. I paused the queue and did the following:
    connected to the test queue
    printed several jobs
    examined the spool file sitting in the paused queue
    Now when I look at the properties of the job in the paused queue it says it is in RAW format which would indicate to me that CSR is still in place. If I use the Citrix Universal Printer the job is sent in EMF (as the CPUD cannot use CSR). I then tried to
    disable CSR using group policy on the RDS servers but the same results. Can anyone offer an explanation on this?

    Not MS bashing as I love what you guys do :)
    I guess we could look at using device specific drivers for our HP MFPs but both the implementing vendor and HP recommended the HP UPD which we use exclusively accross all the HP MFPs we have and have no issue with printing which is great. In our old RDS/Citrix
    implementation we had 100+ drivers and they were a nightmare (mostly due to the fact our RDS Servers were 2003 with some kernel mode drivers and no print host isolation) so I'd hate to go back to that setup. Also, the device specific drivers might not opt
    in either meaning I'd be getting CSR anyways. We notice for some other vendors that disabling CSR returns a good chunk of CPU cycles to the RDS servers that can be used for the users apps whilst our beefy print servers handles the driver specific stuff. I'll
    try and chase up with HP but I cannot believe they would not document this 'design'  in the UPD guide. CSR great for single user PCs but not for multi-user RDS servers in my (albeit limited) experience.

  • Jquery not fired on List display or edit forms in SharePoint 2013

    I have put the below code in List Display form. But I am not getting the alert. It used to work in 2010. After migration to 2013 it is not working although it works fine for all other pages. The jquery reference is on the master page.
    <script type="text/javascript">
    $(document).ready(function(){
    alert('Jquery');
    </script>

    Hi ,
    According to your description, my understanding is that your Jquery code didn’t work in SharePoint 2013 list display form.
    Please use IE Developer Tools(F12) to check whether there is a .js file like the screenshot:
    If not, you need to add a reference from Jquery class library like <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>.
    If this issue still exists, please use the following code to test:
    <script type="text/javascript">
    function show_alert()
    alert("Test!");
    _spBodyOnLoadFunctionNames.push("show_alert")
    </script>
    A similar post for your reference:
    http://sharepoint.stackexchange.com/questions/54125/why-does-jquerys-document-ready-not-fire
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Customize item display form with jslink

    hello ,
    I would like to customize display form of item to hide the ribbon , the footer and columns name in the form.
    How to accomplish my goal with JSLink or any other client side rendering method. 
    I look for a solution with no code.
    Any help will be appreciated.
    Thanks

    Hi,
    You can deploy it as Sandbox solution by developing custom list definition which includes the custom Display form Page instead of default form page. You embed the style sheet in the display form page. 
    http://blogs.technet.com/b/meamcs/archive/2011/09/05/a-listdefinition-with-custom-forms.aspx
    http://www.ilikesharepoint.de/2013/11/sharepoint-create-custom-list-forms-with-visual-studio-part-2/ 
    kmhsad

  • Does URL Services support client side script?

    My ASP page it built as a portlet, and displays fine but it
    won't submit. When I view the Source in my browser, Portal
    didn't include any of my client side vbscript script, then html
    is there but everything else is missing....
    Question: Does URLServices support client-side VBScript?
    I am using some vbscript for validation purposes and then
    using the document.ChangePassword.submit() to submit the
    form.
    If URLServices doesn't support it, then URLServices is totally
    useless... Everyone uses some kind of client-side script to
    validate the form!

    Hi Rea,
    Per my understanding you want to know some information about using the Visual Studio to do the debugging, right?
    Example, If you want to debug a customized extension for SQL Server Reporting Services(SSRS) in Visual Studio, you can attach the process to ReportingSerivcesService. We need to check the items "Show processes from all users" and "Show
    processes in all sessions" to show the "ReportingSerivcesService. exe" process.
    Additionally, please make sure the customized extension is invoked in the Reporting Services(make sure all configurations is set correctly), otherwise we won't be able to run into the breakpoint. More Details information in this article for your reference:Start
    a debugging session for a Store app in Visual Studio (VB, C#, C++ and XAML)
    You can also add the debugger keyword in the code, see
    Debug JavaScript and jQuery using Visual Studio in Internet Explorer browser
    Similar thread below for your reference:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-us/df9dfaab-59af-4a85-916c-ef9e11e07071/debug-custom-net-assembly-in-context-of-sql-reporting-server-2008?forum=sqlreportingservices
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • Sharepoint 2013: How can I use custom filter in XsltListViewWebPart if client site rendering ?

    I wish text box on SitePage where I can input filter value  and XsltListViewWebPart will show items corresponding of my input filter.
    If server rendering I have Filter button in SPD and create parameter that bind my TextBox to Filter.
    But how to must I doing if client side rendering (CSR) ? I haven't Filter button in SPD...    

    So, I resolved it :)
    1) SPD2013 will show "Parameters" and "Filter" buttons for web part, if you click web part properties, change something and save it in SPD2013. After this dumb operation SPD2013 will show additional context menu for web part that include
    "Parameters" and "Filter" buttons. Don't ask me why  :)
    2) All filter work for list - server side, same as in SharePoint 2010. You may add parameter to web part and link filter with this parameter.
    3) Client side rendering will work with ready filtered data only. If you need update filter ->  __doPostBack (POST request)  and server side will back new filtered scope.    AJAX properties may be used to avoid
    all page redrawing.
    4) Yes, you may have additional filter on client side by override onPreRender and simply delete some records from ListData.Row but:
    - it will not affected by header XSLTListView filters
    - data page portions will be working incorrect
    - grout data will be incorrect too
    5) The worst thing it is, even I wish use client side filter in onPreRender I haven't found way how to re-render list without postback request to server. It is mean I can't apply new filter without new request to server :( Even I keep all list data
    as JSON on page. Of cause I can realize it with my own custom gridview but it will need  more effort and will be not so powerfull as use XSLTListWebPart...  

  • Make PeoplePicker a hyperlink in display form

    Hi, I'm trying to make the PeoplePicker show as a hyperlink in the display form of list items. It defaults to just text and can't be clicked. I have both SharePoint Designer and InfoPath at my disposal. Is there a way to do this without using code?
    cameron rautmann

    Hi Cameron,
    Are you talking about person and group column in disform page? If so, when I clicked the value in the this column in disform page, it redirected me to User information list display form page.
    Please provide more information about your requirement or capture a screenshot for it. Here is a thread with similar issue:
    http://social.technet.microsoft.com/Forums/en-US/3eceb2d0-2374-4483-af14-342872a1d534/make-a-column-display-as-a-hyperlink-to-calendar?forum=sharepointgeneralprevious 
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Create Separate Views for New,Edit and Display forms in Infopath

    Hi,
    I need to create a separate views for New, Edit and Display forms in infopath.
    For ex : I need a Submit Button on Display form and not in New/Edit forms.
    I tried, but i amnot able to get the changes.
    Regards, Shreyas R S

    I just validated my approach in a 2013 farm, this is precisely how it's done!
    Step 1) List > Display Form
    Step 2) Change the View within the Web Part Properties. In your screenshot it looks like you simply went to View Item on the single item, which is not the direction I gave =P.
    **Assuming you've already created the multiple views within InfoPath, this allows you to set them up as distinct defaults for New, Edit and Display, let's make that clear. If you are not even to the point of having separate views, that is just in InfoPath,
    Page Design tab, far left, New View button

  • How to set client side validations in ADF Forms

    check for client side validations on submission of a form and display custom error messages.

    Hi,
    you really should take more time in phrasing out a question. I have no clue of what you are actually asking for. Note that ADF Faces performs client side validation e.g. for required fields. Just in case this was the question
    Frank

  • Client-side form validation fails

    Hi guys,
    Below is a very simple form with some client side validation.
    on submission it takes me to the results page with out popping an
    error. I checked it in both IE and Firefox. I checked the source
    after displaying the page and there are javascript elements built.
    I am testing this on my local box, with coldfusion mx 7 on
    apache.
    Is there anything special I have to do with the server
    settings, or browser settings or there something else.
    Thanks,
    Frank
    <cfform action="save.cfm">
    <p>
    <cfinput type="text" name="first_name" required="yes"
    message="enter your first name" validateat="onsubmit">
    : First Name<br />
    <cfinput type="text" name="last_name" required="yes"
    message="enter your last name" validateat="onsubmit">
    : Last Name<br />
    <br />
    Do you love me?<br /><br />
    <cfinput type="radio" name="love" value="yes">
    Yes<br />
    <cfinput type="radio" name="love" value="no">
    No<br />
    <cfinput type="radio" name="love" value="Maybe">
    Maybe<br />
    <br />
    How should we contact you?<br /><br />
    <cfinput type="checkbox" name="contact" value="email">
    Email?<br />
    <cfinput type="checkbox" name="contact" value="paper
    airplane">
    Paper Airplane?<br />
    <cfinput type="checkbox" name="contact" value="can
    phone">
    Can Phone?<br />
    <br />
    <cfquery name="temp" datasource="hrp">
    SELECT distinct department.department_name
    FROM department
    </cfquery>
    What department do you work for?<br /><br />
    <cfselect name="dept" size="1" query="temp"
    value="department_name" display="department_name">
    </cfselect>
    <br /><br />
    <cfinput type="submit" name="submit" value="submit">
    </p>
    </cfform>

    Odd, indeed. The validation Javascript works on my PC,
    showing an alert. I only replaced your query with mine. There might
    be something wrong with your installation of the Coldfusion system
    folder, /CFIDE/scripts/.

Maybe you are looking for

  • Restrict edit access

    I have a report that displays items from a table where owner is a field referring to the creator of the object. I have an edit column, but I'd like to only display the link for the person that created it. I assumed that this could be accomplished via

  • How do I stop the calendar showing past birthdays?

    I want the Birthday Calendar on my iPhone but it's very annoying that it shows past birthdays going back a year or more, Does anyone know how do I stop the calendar showing past birthdays?

  • Regarding ORacle 10g installation

    Hi, I am getting this error while installing oracle 10g database in windows machine. i am getting this error "nmesrvc.exe". Thanks in advance.

  • Having trouble opening iTunes...

    Whenever I open iTunes, it only stays open for about 2 minutes and then I recieve this error message: Runtime Error! Program Files/itunes/itunes.exe The application has requested the Runtime to terminate it in an unusual way. Please call technical su

  • Can't Import (or find) Swing

    G'day Any help would be appreciated. I've looked all over Sun's docs, tutorials, etc., and haven't been able to find the answer to this. Environment: O/S: Red Hat 9 Linux Java : j2sdk1.4.2_03 A minimal dialog box application, which starts out like th