Whenever you create a list or document library there are three new aspx pages created by SharePoint. Modifying these pages is somewhat of a challenge because if you delete the listform web part on any one of these pages it will break the list. The best thing to do is HIDE the default list form by changing the IsVisible property to false (in the code view via SharePoint Designer) and adding a custom list form by highlighting the zone (not the web part) and going to Insert->SharePoint Controls->Custom List Form… to put in your new list form. Choose the list you want to display and what you want it to do (Edit, New, or Display) and you are ready to customize the page.
Fixing a broken page
If you do this you will need to repair it. This involves copying code from somewhere else but not saving it until you have changed the GUIDs. The code for all three pages is very similar. It differs in only a few places. The two things that tell it what kind of page it is are the Control Mode and the FormType. They are as follows.
New – Control Mode is New and Form Type is 8
i.e.
<ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">New</ControlMode>
<FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">8</FormType>
Edit – Control Mode is Edit and Form Type is 6
i.e.
<ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Edit</ControlMode>
<FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">6</FormType>
Display – Control Mode is Display and Form Type is 4
i.e.
<ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Edit</ControlMode>
<FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">6</FormType>
A complete web part looks like this (for New)
<WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{5FB7C1CC-28A2-11DE-9467-510556D89593}" >
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
<Title>Package</Title>
<FrameType>Default</FrameType>
<Description />
<IsIncluded>true</IsIncluded>
<PartOrder>1</PartOrder>
<FrameState>Normal</FrameState>
<Height />
<Width />
<AllowRemove>true</AllowRemove>
<AllowZoneChange>true</AllowZoneChange>
<AllowMinimize>true</AllowMinimize>
<AllowConnect>true</AllowConnect>
<AllowEdit>true</AllowEdit>
<AllowHide>true</AllowHide>
<IsVisible>true</IsVisible>
<DetailLink />
<HelpLink />
<HelpMode>Modeless</HelpMode>
<Dir>Default</Dir>
<PartImageSmall />
<MissingAssembly>Cannot import this Web Part.</MissingAssembly>
<PartImageLarge />
<IsIncludedFilter />
<ExportControlledProperties>true</ExportControlledProperties>
<ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
<ID>g_52D6FB4E-28A2-11DE-B8BC-260556D89593</ID>
<ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{4315DD75-9C4F-412D-9CAC-36D3737FA30A}</ListName>
<ListItemId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">0</ListItemId>
<ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"> New</ControlMode>
<TemplateName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"> ListForm</TemplateName>
<FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">8</FormType>
<ViewFlag xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"> 1048576</ViewFlag>
<Toolbar xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">None</Toolbar>
</WebPart>
</WebPartPages:ListFormWebPart>
If your web part has disappeared (SharePoint will yank it out if it conflicts with another web part) then you need to place it in the web part zone. Between <WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main"><ZoneTemplate> and </ZoneTemplate></WebPartPages:WebPartZone>
DON’T SAVE THE PAGE YET. You will need to get two GUIDs
There are a variety of places to get GUIDs (like Visual Studio) or you can go to http://www.somacon.com/p113.php and get them. The two places you need to put them are where it says <ID> right under <Connection ID>. Replace the GUID after the g_
The second place is the _WebPartID GUID. Once you have done this then you can save the page.
What if the page still doesn’t work or if clicking New, Edit, or trying to display it causes an error
You can get some weird errors such an “Unknown URL” or it goes back to the home page. If this is happening you need to reset the properties of the list or document library. This is done via SharePoint Designer. Open up the list in SPD and right click on the list in question. You should see a properties option. Then click on Supporting Files. Choose the files you want for Display, Edit, and New (or you can leave them if they are correct). Next (and this is bolded for a reason) click on the Content Type Specific Forms and change it from Folder to Item. This is very important because it won’t take it you don’t. You should be good to go then. If things still aren’t working it is probably because you have duplicate GUIDs from copying. You can’t have any duplicate GUIDs even if they are in another list. You might think you have fixed your current situation but you have probably broken another list if you saved your GUIDs before getting new ones.