Friday 18 February 2011

Create a custom New Item form for SharePoint Custom Lists

You do not have to use the built in New Item form that you get when you want to add new item to a SharePoint list. You can create a specially formatted form for instance with fields grouped and various layouts. To achieve this you need to have SharePoint designer installed (free from Microsoft) and the how from below.

I had to do this four times now in the past couple of years or so and every time need to remind my self the steps. So here it is:
  1. Create your custom list with all the columns you need.
  2. Using SharePoint Designer open the site containing the custom list you want to create a new "New Item" form.
  3. Browse to the custom list web part under Lists folder.
  4. By default you'll find there four .aspx pages: AllItems.aspx, DispForm.aspx, EditForm.aspx and NewForm.aspx pages. Copy and paste NewForm.aspx page.
  5. Rename the new page to anything you like i.e. NewIncidentForm.aspx
  6. Open the page to edit.
  7. Delete the web part in it.
  8. Go to Insert menu and choose SharePoint Controls then Custom List Form...
  9. You will be presented with a small window where you need to choose your custom list. Content type will be Item just make sure you choose "New item form" under Type of form to create.
  10. When you click ok the standard new form will be inserted in your new page in a table format. Get in and start re-designing the form any way you like.
Hope this will help someone.

No comments: