Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Form controls you can use on a Web page
 

You can insert form (form: A document that contains fill-in blanks, or form fields, in which you enter information. For example, you can create an online registration form in Microsoft Word that uses drop-down lists from which users can select entries.) controls (control: A graphical user interface object, such as a text box, check box, scroll bar, or command button, that lets users control the program. You use controls to display data or choices, perform an action, or make the user interface easier to read.) on a Web page when you want to design forms for collecting or providing data. The controls are standard HTML (HTML: The standard markup language used for documents on the World Wide Web. HTML uses tags to indicate how Web browsers should display page elements such as text and graphics and how to respond to user actions.) form controls used on the World Wide Web (World Wide Web (WWW): The multimedia branch of the Internet that presents not only text, but also graphics, sound, and video. On the Web, users can easily jump from item to item, page to page, or site to site by using hyperlinks.).

Because forms require additional support files and server support, it is recommended that you work with your network or Web administrator when planning your form.

Form controls and associated properties

Button image

Show Check Box

Insert a check box that you can select or clear next to an independent option. Also, insert a check box next to each item in a group of choices that are not mutually exclusive — that is, you can select more than one check box at a time. To place text beside a check box, type it on the form; this option button doesn't have a caption property for this purpose.

Properties

Checked  Determines whether the check box is selected by default.

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

Value  The text sent to a Web server if the box is selected. Check boxes that aren't selected are ignored by the Web server when a form is submitted.

Button image

Show Option Button

Insert an option button next to each item in a group of two or more choices that are mutually exclusive — that is, you can select only one option button at a time. To place text beside this option button, type it on the form; this option button doesn't have a caption property for this purpose.

Properties

Checked  Determines whether the option button is selected by default.

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server. Use the same name for other option buttons in the same group. Multiple groups are permitted on the same form.

Value  The text sent to a Web server if the option button is selected.

Button image

Show Drop-Down Box

Insert a box that displays available choices in a drop-down list. Enter the items you want to appear in the list in the DisplayValues property.

Properties

DisplayValues  The items to display in the list. Enter all the items for the list, and separate them with a semicolon; do not type spaces between the items. For example:

Item1;Item2;Item3

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

MultiSelect  Defaults to False. Determines whether the user can select more than one item. If you change the MultiSelect property setting to True, the control becomes a list box. If you change the MultiSelect property settings, the settings for the Selected property are cleared.

Selected  Determines whether the first item appears in the box and whether the first item is selected by default.

Size  The size of the font. Defaults to 1.

Values   The text sent to a Web server for each item in the list. The names of the values can differ from the display values, but the number of values must be equal to or greater than the number of display values. Values are also separated with a semicolon; do not type spaces between the values. For example:

Value1;Value2;Value3

Button image

Show List Box

Insert a box that displays available choices in a list format. If the list exceeds the box size, the user can scroll through the list to view additional choices.

Properties

DisplayValues  The items to display in the list. Enter all the items for the list, and separate them with a semicolon; do not type spaces between the items. For example:

Item1;Item2;Item3

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

MultiSelect  Determines whether the user can select more than one item. Defaults to False. If you change the MultiSelect property settings, the settings for the Selected property are cleared.

Selected  Determines whether the first item appears selected by default.

Size  The depth of the list as measured by the number of items that appear. Defaults to 3. If the MultiSelect property is set to True, defaults to 1.

Values  The text sent to a Web server for each item in the list. The names of the values can differ from the display values, but the number of values must be equal to or greater than the number of display values. Values are also separated with a semicolon; do not type spaces between the values. For example:

Value1;Value2;Value3

Button image

Show Text Box

Insert a control in which the user can enter one line of text.

Properties

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

MaxLength  The number of characters the user can enter. Defaults to 0, which doesn't restrict the length.

Value  The default text to display in the text box (optional).

Button image

Show Text Area

Insert a control in which the user can enter multiple lines of text.

Properties

Columns  The width of the text area in number of columns.

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

Rows  The height of the text area in number of rows.

Value  The default text to display in the text area (optional).

WordWrap  Virtual, Physical, or Off. Text will wrap in the box if WordWrap is set to Virtual or Physical; if set to Off, text will not wrap as a line fills up with text. Not all Web browsers (Web browser: Software that interprets HTML files, formats them into Web pages, and displays them. A Web browser, such as Microsoft Internet Explorer, can follow hyperlinks, transfer files, and play sound or video files that are embedded in Web pages.) support WordWrap.

Button image

Show Submit

Submit the data that the user fills into other form controls. Every form must have one submit button or one submit with image button.

Properties

Action  Enter the location of the file that opens when the user clicks the submit button. The action attribute becomes the URL (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet, for example: http://www.microsoft.com/.) of the <FORM> tag. Mailto operations are supported in this field; enter the Internet mail address after "mailto:".

Caption  The text that appears on the button.

Encoding  Stores the MIME (MIME: A list of standards for conveying multimedia resources via Internet connections. The MIME type informs a program what the object contains (for instance, graphics, sounds, or videos).) type used to encode the submitted form. This field defaults to "application/x-www-form-urlencoded".

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

Method  The method to be used for submitting the form: POST or GET.

Button image

Show Submit with Image

Display a graphic the user clicks to submit data. Every form must have a submit button or submit with image button. When you insert this control, the Picture dialog box appears; select the image you want. When you copy the Web page to a Web server, you must also copy the button image.

Properties

Action  Enter the location of the file that opens when the user clicks the submit button. The action attribute becomes the URL (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet, for example: http://www.microsoft.com/.) of the <FORM> tag. Mailto operations are supported in this field; enter the Internet mail address after "mailto:".

Encoding  Stores the MIME (MIME: A list of standards for conveying multimedia resources via Internet connections. The MIME type informs a program what the object contains (for instance, graphics, sounds, or videos).) type used to encode the submitted form. This field defaults to "application/x-www-form-urlencoded".

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

Method  The method to be used for submitting the form: POST or GET.

Source  The name of the image source file.

Button image

ShowReset

Reset the form controls to their default settings, and remove data the user has entered into the form.

Properties

Caption  The text that appears on the button.

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

Button image

Show Hidden

Insert a hidden control that's used to pass information to a Web server — such as information about the user's operating environment — when the user submits the form. When you are not in forms Design, this control is visible when hidden text is showing in your document.

Properties

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

Value  The default text that is sent to a Web server. The Hidden control always returns its value.

Button image

Show Password

Insert a text box that displays an asterisk (*) to mask each character that the user types.

Properties

HTMLName  The internal name you assign to the control. The name is used to identify the field name when the information is sent to a Web server.

MaxLength  The number of characters the user can enter. Defaults to 0, which doesn't restrict the length.

Value  The default text, displayed as asterisks (*), for this field (optional).

 Note   The Web Tools toolbar also provides commands for adding movies, sounds, and scrolling text to your Web pages.

© 2009 Microsoft Corporation. All rights reserved.