Setting up the form element


    The form element identifies the current Web page or section of a Web page as a form and instructs the browser where and how to return form information for processing. The content of your form must be contained in the box that surrounds the Form icon in the document window. If you are using an HTML table to design your form, be sure to put the Table icon in the box that surrounds the Form icon in the document window. The form element must precede any other form elements.

To set up the form element:

  1. Drag the Form icon from the Forms set in the Objects palette, or double-click the icon.
  2. In the Form Inspector, choose an option from the Name/ID menu (choose Name & ID for maximum browser compatibility), and then type a unique form name in the Name/ID text box. A unique name is especially important if you have more than one form on your page, or if you use CGI scripting.
  3. In the Action text box, specify or type the directory and file name of the CGI script where the information will be sent when the viewer clicks the Submit button.
  4. Note: Check with your Internet service provider for information on CGI scripts available to you and the location of scripts on the server. Avoid using a mailto link in the form's action because your viewers may not have their browsers configured properly for sending the data to the server.

  5. If your form is embedded in a frame set and you want to control where the HTML page returned by the Web server appears, choose a target location from the Target menu. (See Setting up target frames.)
  6. Select an encoding method from the Encode pop-up menu:
    • Default and application/x-www-form-url-encoded are the same. These use the ASCII character set.
    • Multipart/form-data tells the server where the files begin and end.
    • Text/plain sends the form data as plain text.
  7. In the Method pop-up menu, determine how the form information will be sent:
    • Post returns data entered by the viewer information separately from the Web page.
    • Get sends the viewer's entries appended to the URL in the Action text box.
    • Default omits the Method attribute.

    Note: It is recommended that you use the Post option. Using Get to append information to the destination file may exceed the URL length limit and possibly cause data loss.