tags:

views:

710

answers:

2

How do i restore a deleted NewForm.aspx file? I dont want it back through the recycle bin, since i made a mess of it, i just want to recreate the original file. Sharepoint 2003 was able to do this.

A: 

could you restore it from the recycle bin and then in sharepoint designer try a "restore to site definition" (right mouse click on the file). P.S. Never change the out of the box newform / editform etc. Copy it, then in the list settings in sharepoint designer (right mouse on list) set the newform property to point to the new copied custom form. This way you can alwys go back by just resetting the property in the list settings instead of getting the problems you have now.

Here's an in-depth explanation: WinSmarts article

Colin
Problem with this solution is that even after i clicked restore to site definition, i got my old modified file back (go figure?), which is why i resorted to deleting it in the first place.
A: 

As Colin mentioned, always make a copy. Of course, you can recover from deleting or corrupting your newform but it's a little bit of a pain. SharePoint's odd behaviour causes lots of people to do this... very often we create a new SharePoint form but the list refuses to use it as a replacement newform or editform so we delete the original.

Off of the top of my head, I believe you can copy the newform.aspx from another list or library and then update the GUIDs in the source view. Once you retrieve the file, however, you will have to complete 2 additional steps in order to get it to work. SharePoint requires a strange synergy between lists and libraries and their supporting pages. People are aware of the first, which is called Supporting Files, by right mouse keying on list you can choose supporting files for display, edit and new. What most people don't know is that these files, well actaully their components, must be "aware" of the fact that they are of type display, edit, or new. If they are not "aware" then any changes you make to "Supporting Files" will not stik.

To create a new page or update an existing one, locate your newly created or broken newform.aspx, if you are creating it from scratch go to Insert >> SharePoint Controlls >> Form Web Part... select the form web part of your choice and add it. Upon insertion view the properties of the form control andselect the radio button "NEW ITEM FORM". After you save the page you can then select the page as a supporting file for the list and the setting will stick.

UJ
Alas, no...I was hoping this would do the trick but it doesnt.I tried different scenarios based on this trick, but none of them worked.I am killing the list and recreating it.