0

I have a custom list and when I view a single item the standard DispForm.aspx is used to display the item

I am able to override those fields via JSLink but is it possible to override the table itself and replace it with some custom divs?

  • What do you mean by the table here? Were you referring to the whole structure in the dispform.aspx page? – Naveen Jun 24 '15 at 10:22
  • yes to remove/replace the default table that sharepoint produces and instead build my own html with divs – Tomas Jun 24 '15 at 12:04
  • If that is the case why you would like to go with JSLink. Apparently JSLink is for the field to change its rendering but if you would like to change the entire form i recommend you to delete the OOB webpart which is giving you the form and place your custom webpart there instead. You can edit the dispform.aspx page and delete the OOB webpart and place yours. Let me know if you have any questions. – Naveen Jun 24 '15 at 12:11
0

Yes, that is possible to achieve using JSLink and display templates. Take a look at the following resources:

http://curah.microsoft.com/73023/jslink-articles

https://msdn.microsoft.com/en-us/library/office/aa544142%28v=office.14%29.aspx

Some Client Side Rendering examples here: https://code.msdn.microsoft.com/office/Client-side-rendering-code-a52cf8a7

Customizing SharePoint forms: http://www.codeproject.com/Articles/223431/Custom-SharePoint-List-Forms

Hope this helps.

  • ok but its not the form I want to customize, its the single item view – Tomas Jun 24 '15 at 12:12
  • You got a bit confused I believe. DispForm.aspx is a Form and if you want to customize it, you create a new Display Template based on an existing one and override it's contents (divs or whatever). In other words, you replace the default, your so called "table" with your contents in DispForm.aspx (which you call a single item view). I hope this is more clear now. – Paul Strupeikis Jun 24 '15 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.