Back Forward Home Print Search
Windows SharePoint Services 3.0 Help and How-to >  Customizing sites, pages, lists, and libraries >  Customizing pages by using Web Parts
Form Web Part
Form Web Part

You can use the Form Web Part to connect to and filter a column of data in another Web Part. Both Web Parts must be installed on a server running Microsoft Windows SharePoint Services.

In this article


Ways you can use the Form Web Part

You can use the Form Web Part to:

  • Filter all employees with the same last name in a List View Web Part that contains employee data.
  • Customize the Form Web Part by adding option buttons, check boxes, and text boxes with default values to filter a List View Web Part that contains product information.
 Top of Page

Connect the Form Web Part to another Web Part

To use the Form Web Part, you connect it with another Web Part that is capable of filtering through a Web Part connection, such as the List View Web Part. You connect the Form Web Part by selecting from the Connections submenu on the Web Part menu. You can connect the Form Web Part to one or more Web Parts on the Web Part Page.

  1. If you are not already in edit mode, on the Site Actions menu Site Actions menu, click Edit Page.
  2. Click the Web Part menu Web Part Edit Menu, and then point to Connections.
  3. Point to Provide Form Value To, and then click the name of the Web Part to which you want to link.

After you connect the Form Web Part to another Web Part, you can type text in the text box and then click Go or press ENTER. The other Web Part will display data that matches the text you typed.

To clear the text box so that you can type new text, select the current text, and then delete it.

 Top of Page

Customize the Form Web Part

You can customize the Form Web Part by using either the Source Editor custom property or a Web design program that is compatible with Windows SharePoint Services, such as Microsoft Office SharePoint Designer 2007.

You can enhance the Form Web Part by adding other form elements, such as option buttons, check boxes, default values, and list boxes. You can also create forms with several fields to combine criteria and then pass more complex filters to the other Web Part. After you customize the Form Web Part, you can create another instance of it and add it to a Web Part gallery on your site.

If you customize the Form Web Part, keep in mind the following important points:

  • Only one Go button (which uses the HTML INPUT element) can be used to pass data to the other Web Part.
  • The Form Web Part uses the HTML FORM element. Certain HTML elements cannot be used inside the FORM element, including the HTML element, the BODY element, and the HTML FORM element.
  • All form field names must be unique. Each name value is used to connect to a corresponding column name in the Web Part that you are connecting to.
  • You can use only the following HTML FORM element controls, and they pass the following values to the other Web Part.
    ControlHTML elementValue passed
    Text box<INPUT TYPE="text">The VALUE attribute.
    Text area<TEXTAREA>The VALUE attribute.
    Check box <INPUT TYPE="checkbox">The VALUE attribute if selected; the string "off" if not selected.
    Option button <INPUT TYPE="radio">The VALUE attribute if selected; the string "off" if not selected.
    Drop-down list box<SELECT>A comma-delimited string of the VALUE attributes of the selected options; the string "off" if no selection. For example, if "chairs" and "tables" are selected, the VALUE attribute is "chairs,tables".

 Note     The Form Web Part only provides data to another connectable Web Part — it cannot get data from another connectable Web Part. For example, you cannot use the Form Web Part as a detail form to display a row of data.

 Top of Page

Custom property of the Form Web Part

The custom property of the Form Web Part is listed below.

 Notes 

  • You cannot view or edit this property in a personal view.
  • You can more easily customize the Form Web Part by using a Web design program that is compatible with Windows SharePoint Services, such as Office SharePoint Designer 2007.

PropertyDescription
Source EditorOpens a Text Editor window where you can add or edit HTML source code. The Source Editor is intended for users with knowledge of HTML syntax.

 Caution    The Form Web Part dynamically creates a scripting routine at run time to create the connection to the other Web Part. Do not modify the onkeydown or onclick event code in the Source Editor, or you may unintentionally break the Form Web Part.

 Top of Page

Common properties of Web Parts

All Web Parts share a common set of properties that control their appearance, layout, and advanced characteristics.

 Note    The common Web Part properties that you see in the tool pane may be different from what is documented in this section for several reasons:

  • To see the Advanced section in the tool pane, you must have appropriate permission.
  • For a specific Web Part, a Web Part developer may have chosen not to display one or more of these common properties or may have chosen to create and display additional properties that are not listed below in the Appearance, Layout, and Advanced sections of the tool pane.
  • Some permission and property settings may disable or hide Web Part properties.

Appearance

PropertyDescription
TitleSpecifies the title of the Web Part that appears in the Web Part title bar.
HeightSpecifies the height of the Web Part.
WidthSpecifies the width of the Web Part.
Chrome StateSpecifies whether the entire Web Part appears on the page when a user opens the Web Part Page. By default, the chrome state is set to Normal and the entire Web Part appears. Only the title bar appears when the state is set to Minimized.
Chrome TypeSpecifies whether the title bar and border of the Web Part frame are displayed.

Layout

PropertyDescription
HiddenSpecifies whether the Web Part is visible when a user opens the Web Part Page. If the check box is selected, the Web Part is visible only when you are designing the page and has the suffix (Hidden) appended to the title.

You can hide a Web Part if you want to use it to provide data to another Web Part through a Web Part connection, but you don't want to display the Web Part.

DirectionSpecifies the direction of the text in the Web Part content. For example, Arabic is a right-to-left language; English and most other European languages are left-to-right languages. This setting may not be available for all types of Web Parts.
ZoneSpecifies the zone on the Web Part Page where the Web Part is located.

 Note    Zones on the Web Part Page are not listed in the list box when you do not have permission to modify the zone.

Zone IndexSpecifies the position of the Web Part in a zone when the zone contains more than one Web Part.

To specify the order, type a positive integer in the text box.

If the Web Parts in the zone are ordered from top to bottom, a value of 1 means that the Web Part appears at the top of the zone. If the Web Parts in the zone are ordered from left to right, a value of 1 means that the Web Part appears on the left of the zone.

For example, when you add a Web Part to an empty zone that is ordered from top to bottom, the Zone Index is 0. When you add a second Web Part to the bottom of the zone, its Zone Index is 1. To move the second Web Part to the top of the zone, type 0, and then type 1 for the first Web Part.

 Note    Each Web Part in the zone must have a unique Zone Index value. Therefore, changing the Zone Index value for the current Web Part can also change the Zone Index value for other Web Parts in the zone.

Advanced

PropertyDescription
Allow MinimizeSpecifies whether the Web Part can be minimized.
Allow CloseSpecifies whether the Web Part can be removed from the Web Part Page.
Allow HideSpecifies whether the Web Part can be hidden.
Allow Zone ChangeSpecifies whether the Web Part can be moved to a different zone.
Allow ConnectionsSpecifies whether the Web Part can participate in connections with other Web Parts.
Allow Editing in Personal ViewSpecifies whether the Web Part properties can be modified in a personal view.
Export ModeSpecifies the level of data that is permitted to be exported for this Web Part. Depending on your configuration, this setting may not be available.
Title URLSpecifies the URL of a file containing additional information about the Web Part. The file is displayed in a separate browser window when you click the Web Part title.
DescriptionSpecifies the ScreenTip that appears when you rest the mouse pointer on the Web Part title or Web Part icon. The value of this property is used when you search for Web Parts by using the Search command on the Find Web Parts menu of the tool pane in the following Web Part galleries: Site, Virtual Server, and Web Part Page.
Help URLSpecifies the location of a file containing Help information about the Web Part. The Help information is displayed in a separate browser window when you click the Help command on the Web Part menu.
Help ModeSpecifies how a browser will display Help content for a Web Part.

Select one of the following:

  • Modal Opens a separate browser window, if the browser has this capability. A user must close the window before returning to the Web page.
  • Modeless Opens a separate browser window, if the browser has this capability. A user does not have to close the window before returning to the Web page. This is the default value.
  • Navigate Opens the Web page in the current browser window.

 Note    Even though custom Microsoft ASP.NET Web Parts support this property, default Microsoft Windows SharePoint Services 3.0 Help topics open only in a separate browser window.

Catalog Icon Image URLSpecifies the location of a file containing an image to be used as the Web Part icon in the Web Part List. The image size must be 16 by 16 pixels.
Title Icon Image URLSpecifies the location of a file containing an image to be used in the Web Part title bar. The image size must be 16 by 16 pixels.
Import Error MessageSpecifies a message that appears if there is a problem importing the Web Part.
 Top of Page