Tuesday, December 23, 2008

Creating Data Forms in SharePoint Designer, Part 3: Building the Data Form Web Part

In the last post I showed you how to create a site with a blank Web Part page and two SharePoint lists for keeping storing FAQ categories and questions. In this post I will show you how to create a form against those two lists and insert it onto the page.

On your desktop, open up SharePoint designer. If it does not automatically open to your site, then click on File -> Open Site and open your site. Your designer panes should look something like this:

Double-click on the default.aspx page to open it. Next, click in the open area of the left “Web Part Zone” so that it becomes highlighted with a bold blue border like this:

From the menu, select Task Panes ->Data Source Library to make the Data Source Library pane come to the front (mine is displayed on the right side of the screen).

If you followed along in the last blog post, you will see two SharePoint Lists in the pane: FAQ Categories and Frequently Asked Questions. Hover over Frequently Asked Questions so the drop-down arrow appears, then click Show Data.

Click on “Question” so that it is the only field in the row that is highlighted. Then, holding in your Ctrl key, click on “Answer” so that it is highlighted also.

With your Web Part Zone still highlighted, click the Insert Selected Fields as… button and choose Multiple Item View. With that, your DataFormWebPart will be added to the Web Part Zone and is ready for you to customize.

Save your work by hitting Ctrl+S or File -> Save. Answer Yes to the dialog that appears.

In the next post, I will walk through the sorting and grouping options.

No comments: