I have created a custom newform.aspx using the copy of the existing Sharepoint 2010 list form using SP Designer tool.Now i want to make this mynewcustomform.aspx as the default form when the user clicks on the new item in my SPList.How to achieve this ?
- Open SP Designer
- In left side, click on "List and Libraries" in Site objects pane.
- All lists and libraries will open in right pane.
- Single click the desired list name.
- In extreme right side you can see a Forms Pane with list of all forms(Default and your custom forms).
- Select(single click) you custom form.
- In highlighted ribbon you can see a option "Set as Default". Click it, and your custom form is set to default.
You will have a Set as Default button visible in the ribbon if you select the form. Go to Lists and Libraries -> Choose List -> In the forms section, choose your form -> Click on Set as Default in the top ribbon.
In SP designer when you open settings of the list where you have on right side forms part. When you click button New.. Choose NewForm and than check checkbox that says set as default.
Open your site in SharePoint Designer and navigate to your list. In the Forms section, select your custom newform.aspx page and in the Ribbon click Set as Default.
If you want this to be set up automatically. You can create a custom list definition and change the Form-Node e.g.:
<List> ... <MetaData> <Forms> <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /> <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /> <Form Type="NewForm" Url="NewForm.aspx" SetupPath="features\$SharePoint.Feature.DeploymentPath$\mynewcustomform.aspx" WebPartZoneID="Main" /> </Forms> </MetaData> </List>