none
How to revert webpart form to the original state

    Question

  • I customized a default display form - added some .js and .html code. While saving changes SharePoint Foundation 2013 popped up an error and from that point "Page not found" displayed whenever I tried to display list record details. So I deleted DispForm.aspx and created a new one in SharePoint Designer. The display form works now but it's weird. For example the list has a field with multiple users and groups and this field is displayed as html tags instead of a readable list of users. When I try to edit display form web part directly in SharePoint there are options "XSL editor" and "Parameters editor". These options are not present while editing display form web parts in other lists. I would like to revert display web part form to original state. There must be something outside the DispForm.aspx file. Could anyone help? Thank you.

    Monday, January 9, 2017 7:29 AM

Answers

  • Hi Cameron,

    You're right, I didn't make a copy of the form before - my fault. I have grabbed code from EditForm.aspx and changed "__WebPartId" attribute and some tags (PageType, FormType, ControlMode) and it works!

    Thank you.

    Jaromir Karmazin

    Tuesday, January 10, 2017 5:21 AM

All replies

  • Hi LastMoravian- I'm assuming you didn't make a copy of the DipForm before customizing it? If you did, you could just make the original the default. If not, then that was a mistake. I'd suggest grabbing code from another OOTB DispForm and use that to rebuild the problem one.

    cameron rautmann

    Monday, January 9, 2017 1:27 PM
  • Hi Cameron,

    You're right, I didn't make a copy of the form before - my fault. I have grabbed code from EditForm.aspx and changed "__WebPartId" attribute and some tags (PageType, FormType, ControlMode) and it works!

    Thank you.

    Jaromir Karmazin

    Tuesday, January 10, 2017 5:21 AM
  • Hi Jaromir,

    Thanks for your sharing and it will help others who meet the same issue in this forum.

    Best Regards,

    Victoria 


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, January 10, 2017 9:27 AM
    Moderator