Create a custom list form for a SharePoint list

SharePoint has always been good for basic business forms. A custom SharePoint list can be configured to collect any type of data and SharePoint automatically generates the forms for adding new items, editing items and viewing items. In SharePoint 2007, the workflow capabilities make SharePoint lists an even more attractive foundation for basic business forms.

In order to manage the data you collect from the form submitters, you will often have a few extra columns (e.g. status, notes, etc.) that you don’t want the user to fill in when submitting the form. Using SharePoint Designer you can create a customised version of the form for adding new items that does not have your extra management columns on it.

1. Open your site in SharePoint Designer.
2. Browse to your list and open the ‘NewForm.aspx’ web form.
3. Go File > Save As… and give the form a new name such as ‘NewForm2.aspx’.
4. Delete the default List Form Web Part from the page.
5. Go Insert > SharePoint Controls > Custom List Form.
6. In the List or Document Library Form dialog, select the appropriate list, content type and type of form.
7. Click OK and a new Data Form Web Part is added with controls representing all the fields from the list (in my environment all the controls show “Error Rendering Control” but this does not affect the final result).
8. In the newly added Data Form Web Part, delete the rows containing fields not to be shown to the user (ensure that fields being removed are not required fields without default values as this would prevent the user from submitting the form).
9. At this point, you can do other customisation such as rearranging the fields if you wish.
10. Save the site.

To give users access to your new form, publish a link to the NewForm2.aspx page. By using the Source query string parameter you can direct users back to where they came from after submitting the form. For example, if you publish the link on ‘http://portal.example.com’ then the URL to the form would be ‘http://portal.example.com/Lists/YourList/NewForm2.aspx?Source=http://portal.example.com’.

Advertisements

One Response to Create a custom list form for a SharePoint list

  1. Xiaoxiao says:

    I used Sharepoint Designer and did the follwing
    -Create a new ASPX page
    -Insert Sharepoint Control
    -Choose Custom List Form…
    -Pick my custom task list and the content type.

    But after this, nothing happened. I mean no code(columns of fields)has been inserted.
    Another strange thing is when I open the default edit form aspx for my custom task list, it only shows three genric columns with names such as Name1, Name2, etc. It is totally different from when I run this edit form from IE or Firefox(in which all the columns shown as I expected).
    Please let me know why this happened? What might I miss?

    thanks
    xiao

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: