Linking Display and Edit form for a specific content type RRS feed

  • Question

  • I wanted to check if someone can help with display and edit form URL for a specific content type. I got one for a new form but it isn't working for Edit and display form. I want to have some display text that should open display form of a specific content
    Wednesday, April 6, 2016 10:04 AM


All replies

  • Do you want to change the edit and display forms of content type?

    Then please find this

    var specificList = oWebsite.Lists.GetByTitle("SpecificListName");
    var specificListContentTypes = specificList.ContentTypes;

    specificListContentTypes holds all the content type those are being using in your SpecificList. So you have to find your desired content type. You can try GetById.

    var myDesiredContentType = specificListContentTypes.GetById("Id of myDesiredContentType");

    Now change the URL and Update()

    myDesiredContentType.EditFormUrl = "Your URL";
    myDesiredContentType.NewFormUrl = "Your URL";

    Wednesday, April 6, 2016 1:54 PM
  • Thanks for your response. can you also guide me the steps where i have to put this code so that I pull a content type edit and display form via URL
    Friday, April 8, 2016 5:10 PM
  • Thanks for your response. can you also guide me the steps where i have to put this code so that I pull a content type edit and display form via URL

    You need to add the above code to the console application. To get started with CSOM for SharePoint 2013 follow the below

    Rajesh | Blog

    Friday, April 8, 2016 5:18 PM
  • Ok, thanks so much, I guess I do not have access to modify code at that level. Is there any other out of the box feature that I can use to display edit and view form for SharePoint content type form. Something that can be either achieved through java script or SharePoint designer.
    Sunday, April 10, 2016 1:16 PM
  • I think you can tweak the code for JSOM and add to a script editor webpart and run with privileged account which can edit list settings.. Since it's making permanent binding of forms with the list content type, you might need to run it only once per list.

    Rajesh | Blog

    Monday, April 11, 2016 5:27 AM
  • Follow this article and video for creation of custom forms using sharepoint designer

    Monday, April 11, 2016 5:40 AM
    • Proposed as answer by SP2013GK Wednesday, April 13, 2016 11:28 AM
    Monday, April 11, 2016 6:39 AM
  • You can create custom Display and Edit forms using just SharePoint Designer. In SPD go to your list and then click the New icon in the Forms panel, or the List Form button in the ribbon. Either way you then get to set which type of form it is you're creating, whether it will be the default display/edit form in the list, and which content type it is going to work with.

    You can also do what sk2014 suggested through SPD, by going to the Content Types in the navigation, selecting your content type and then setting the URLs for the display/edit/new forms. But before you save the changes you need to toggle the "Push Changes to Sites and Lists" button in the ribbon.


    SharePoint Systems Officer, Capital Regional District, BC, Canada

    Monday, April 11, 2016 10:09 PM