2007-04-19

Creating custom forms for sharepoint lists using SharePoint Designer

Yes, we all have to face it (sooner or later): SharePoint designer IS a great tool - the tool - to customize SharePoint applications! We (as programmers) DO NOT need to write invent the wheel again, and again, and again.... SharePoint Designer AND Visual Studio 2005 (and C# programming) will be OUR tools.

So, how do we create a customized form to register our data in a list? Follow these steps:

  1. Open the site in SharePoint designer where the list is located and navigate to the list
  2. Make a copy of the newform.aspx and name it mynewform.aspx
  3. Open mynewform.aspx in the designer in html view
  4. Select the ListFormWebPart and delete it
  5. Select 'Insert Sharepoint controls Custom List form'
  6. Add design elements, move things around, delete fields, etc to create the form as you would like it.
  7. Save it.
  8. Right click the list name in the folder list and select Properties
  9. Select the 'Supporting files' tab
  10. Select Item in the 'Contenty type specific forms' list
  11. In the field 'New Item Form' browse to mynewform.aspx
  12. Select 'OK'.
  13. Browse to your list in the web browser, select New and your mynewform.aspx should be the form that is used

Other articles:

11 comments:

Anonymous said...

Attachments are not working, once we customize the form

Steve said...

This does not work with custom content types.

Renato Golia said...

Hi, when i try to add the "Custom List Form" the menu item is greyed out.

Any work around?

Thk a lot.

Christopher R said...

You have to find a spot on the page where you are allowed to insert the Custom Form Web Part. If you select the the entire original Form Web Part, end then go to the menu to insert the Custom Form Web Part it should work. Then delete the original Form Webpart afterwards.

Anonymous said...

Everything works until step 11-12. I Browse to my file and select it then click Apply, OK but it doesn't save the changes. If I click to see the properties again, it shows the old file name. What did I do wrong?

Manesh Karunakaran said...

The recommended way
http://office.microsoft.com/en-us/sharepointdesigner/HA101191111033.aspx

Daniel said...

Everything works until step 11-12. I Browse to my file and select it then click Apply, OK but it doesn't save the changes. If I click to see the properties again, it shows the old file name. What did I do wrong?

I'm having the smae problem - any idea's?

Anonymous said...

If things stay grayed out. Make sure you:
1- you have the Sharepoint Assembly Registered using the Register Page directive.
2- you save the file before going to the menu and select the insert SharePoint Control.

Regards Koen

Anonymous said...

As I can see you need full contributor permisions to be able to store the changes.

chanakya01 said...

@Daniel : In the Supporting Files Tab before browsing for the custom form, select "Item" from the "Content Type Specific Forms" drop-down instead of folder.

Joan said...

In our SharePoint projects we use a tool to customize SharePoint Forms: Advanced Forms for SharePoint (http://www.kaldeera.com)

Hope this helps.