About Web forms

Forms are frequently used on Web pages to collect and provide data.

Examples of Web forms

You might create a form on a Web page that allows users to search a database on a Web server for a specific book. The user types the name of the book into your form and clicks the submit button that you placed on the form. The information is sent to the Web server and the database is searched. The results are sent back to the user and appear in another Web page in their Web browser.

You might also create a customer survey. When the user submits the form (by clicking the Submit button that you placed on the form), the information is sent to a database on your Web server for later use.

Adding form controls to a Web page

You create a Web page that you want to add a form to in the same way you normally create a Web page. When you add a form control by using the Web Tools toolbar, a Top of Form boundary is inserted above the control and a Bottom of Form boundary is inserted below the control. Insert the other controls you want in the same form within those boundaries. You can have more than one form on the same Web page; each form exists between its own boundaries. These boundaries appear when you are designing the form and will not appear when the page is viewed in a Web browser.

There are eleven standard form controls you can use on a Web page, for example the Textbox control and the Drop-Down box control. You should always have a Submit control or a Submit with Image control on your Web page. When a user clicks the submit button or image, the information from the form is sent to the Web server for processing. Without a submit button or image, there is no way to send the information to the Web server.

Setting properties for Web form controls

After you have inserted controls on your Web page, you can set the properties for the form controls. The properties of a form control allow you to manage how data is communicated to a Web server; and, for some controls, the properties determine how the controls look on the Web page. Because forms require additional support files and server support, it is recommended that you work with your network or Web administrator when planning the form.