Creating Forms for SharePoint Using SharePoint Designer 2010

There are many ways to creating forms for SharePoint. You can create SharePoint forms using Web Part, InfoPath, and SharePoint Designer. Each option has its advantages and disadvantages.

The web part route requires .NET development knowledge. In addition, maintenance and deployment is a bit complicated. However it gives greater flexibility in customizing forms. On the other hand, updating and creating forms in InfoPath and publishing to SharePoint is easy. One of the downsides to using InfoPath is the limited availability of form controls and form validation. InfoPath also requires enterprise license to run forms in browser.

SharePoint Designer is not forgiving but allows basic forms setup for data collection without much programing skills. Below, we will look at out of the box features in SharePoint Designer 2010 to create forms for SharePoint. To create a form you will need to create a custom list and define the columns. A list is basically a description of data fields in the form.

Creating forms for SharePoint using SharePoint Designer 2010
Creating forms for SharePoint using SharePoint Designer 2010

Creating custom list, add form, edit form, and display form

1. Setup one. Select the Lists and Libraries from Site Objects pane. You will see the predefined lists on the right. Click Custom List from the ribbon and give your list a name – in this case Album.

2. The list will show up on the right. Click on it to show the details. As you can see in the Forms pane, there are three forms created by default. The NewForm.aspx allows you to add items to the list. You can edit or view an item in the list by using the EditForm.aspx and DispForm.aspx forms. Make sure to check the Display this list on the Quick Launch checkbox so that you can see the list in the Quick Launch page in SharePoint.

3. To add your columns for your form click on Edit list columns hyperlink in the Customizations Pane.

4. Then create three columns named Title (single line of text), Author Title (single line of text), and Release Date (Date and Time). You can make some of the columns required or not.

5. Create another list called Track with columns Track Number and Track Name.

6. After making changes make sure to save your changes by clicking the Save icon on the top.

Below is the default view form in SharePoint site after we save the changes in SharePoint Designer 2010. There is one album that I added as an example. To add additional albums click on the Add new item link.

The default view form of the Album list
The default view form of the Album list

Creating sub forms for SharePoint

What we might want to do is connect tracks with albums. To create this parent/child relationship, we will add Lookup column called Album. In the Column Editor, select Album for List or document library and Title for Field.

After making changes and adding two items to the track list, here is how the display form looks.

The display form for the Track list
The display form for the Track list

You can also show tracks in the Album view by adding a Lookup in the Album list. You will need to check the Allow multiple values checkbox to be able to see multiple tracks for each Album.

Below is the screenshot of the edit form interface.

Edit form of Album with parent/child relationship
Edit form of Album with parent/child relationship