0
votes

Good day to you. I am newbie in SharePoint 2013 so please bear with me. I have created around 15 lists in my website each containing same columns but different data (they differ semantically).

I am aware that we can change the default view, edit and display form for each list by creating new form in SharePoint Designer 2013. This seems like a very bad approach as far as the maintenance is concerned. I know my lists are exactly the same so why do I have to create same 15 display forms for each of the lists?

Is there a way to create one custom Display form (may be in a central location, i don't know i am just thinking :P ) for all the lists? Is there a way to tell a list to use a specific display form? Any help will be highly appreciated. Thanks.

3

3 Answers

0
votes

If i understand your question correctly, you have 15 lists with same set of columns. You want to change the display/look of the form. All 15 lists should have same look and feel right!! If yes, then why don't you try with some html, javascript solution. Since you are in sharepoint 2013, javascript support for solutions is very good like rest queries. You can use SPServices also. If you want to to add data to the list whenever you click on the "New Item" link in the list then hijack this link such that it should navigate to your custom form. Pass your list name as query parameter. Whenever user is saving the form, get the list name from the query parameter and save the data to that list. There could be another ways also to achieve the solution with html and javascript.

Useful links: Microsoft, Microsoft, SPServices

0
votes

Sam I think you can create a custom content type and create custom display form for your content type. Enable the content type in each of your lists so automatically this customized form would be available.

The advantage of this approach is that suppose if you need one more list after some time you can just add this content type and your form would be available into the new list as well.

The approach is explained in the link below.

http://blogs.msdn.com/b/varun_malhotra/archive/2009/06/06/define-custom-new-edit-display-forms-for-content-types.aspx

Check this one also https://joshmccarty.com/2011/02/sharepoint-custom-list-with-custom-content-types-and-custom-display-forms/

0
votes

Just wanted to write the solution which I implemented as it might help others as well. (Thanks Hiren and Mihir for your valuable inputs)

I had 15 lists and I was showing the data to the user using content search web part with custom display template. All of the lists were using the same display template so I made a new page just to show the item details. In the display template I pointed the item URL (i hijacked the list name and the current item id) to my new page and displayed the item. Let me know if anyone is interested in the whole solution or further elaboration is required.