Claris Home Page provides the elements you need to create a form on your Web page. You can use a form to solicit input from viewers who read your Web pages. For example, a viewer can order a product, provide feedback, fill out a questionnaire, or specify search criteria.

To process a viewer's input, the form needs to call a Common Gateway Interface (CGI) script written in a script or programming language (such as AppleScript application program or Perl) located on a Web server.

Note Many CGI scripts that handle form input are available on the Web. They can be adapted to handle your form's input. Some Internet Service Providers (ISPs) already have form CGI scripts available on their sites. You can find links to CGI scripts and CGI resources on the Claris Home Page technical support Web page at http://www.claris.com/support/ products/clarispage/.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Creating a form

You can create only one form per Web page in Claris Home Page. Your form can contain text, images, tables, and so forth, in addition to the form elements your viewer interacts with. When you create a form, you add each form element separately and assemble them on the page. Form elements include text areas, text fields, pop-up menus, buttons or checkboxes that the viewer can select, and a submit button that the viewer clicks to send their input to the server. You can also include a button for resetting the viewer's input, a password field, and hidden entry elements in your form.

You can change form elements the same way you change other Web page elements, that is, you can copy them, move them around, and resize them using the same basic methods. See Cutting, copying, and pasting for more information.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Adding form elements to your Web page

All form elements are added to your Web page in the same way. Form elements include: text fields, text areas, password fields, radio buttons, checkboxes, pop-up menus, scrolling lists, submit buttons, a reset button, and hidden entries. Some elements work differently and therefore have specific instructions. The following sections detail each element and their use.

To add a form element to your Web page:

  1. Place the insertion point in the page where you want the element to appear.
  2. Choose Forms from the Insert menu and then choose an element from the submenu.
  3. Select the element and open its Object Editor (choose Show Object Editor from the Window menu).
  4. Enter the name and other specifications for the element in the Object Editor.

    The name of the element is used by the CGI script to locate the viewer's input.

  5. Press Return (Macintosh) or Enter (Windows) to assign the specifications to the element.

Tip To add form elements to your Web pages quickly, you can also choose Show Forms Palette from the Windows menu and drag the appropriate buttons from the palette onto your Web page.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Adding a text field

Text fields can only contain one line of text, can be 1 to 500 characters wide, and can only be resized horizontally. These fields are generally used for shorter information such as a name or phone number.

You can set the maximum number of characters that your viewers can enter in the Max Length text box of the Object Editor.

You can also add text to a text field to show the viewer what kind of information to input, or to provide a default value to be input if the viewer doesn't enter anything in the field.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Adding a text area

Text areas allow your viewers to enter multiple lines of text. The size of a text area is measured in rows and columns where each row is equivalent to one character in width and each column is equivalent to one character in height. A text area can be 1 to 100 rows wide and 5 to 500 columns tall.

The size of a text area does not limit the amount of text that your viewers can enter; if more text is entered, the text area will scroll.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Creating a password field

You can add a field to your form that allows the viewer to type a password. When the viewer enters text into the password field, a series of bullets appears.

Password fields are identical in all respects to text fields, except that they display as bullets rather than text. Be sure to add an image or text to your Web page to let the viewer know it is a password field.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Using radio buttons or checkboxes in a list

Radio buttons allow the viewer to select one choice from a list of options. Checkboxes allow the viewer to select as many choices as they like from the list.

You need to assign the same name to every radio button in a list so they can work together. In addition, you must assign a unique value to each radio button or checkbox to differentiate it from the others in the list.

To create a list of radio button or checkbox choices:

  1. Type the list and place the insertion point before the first item in the list.
  2. Choose Forms from the Insert menu and then choose Radio Button or Checkbox.

    A radio button or a checkbox appears in your Web page at the insertion point.

  3. Select the radio button or checkbox and open its Object Editor.

  4. Type a name in the Button Name textbox and press Return (Macintosh) or Enter (Windows).

    This name needs to be the same for every radio button in a list.

  5. Type a unique name in the Button Value textbox for the radio button or checkbox and press Return (Macintosh) or Enter (Windows).

    This value needs to be different from every other button in the list.

  6. To make a radio button or checkbox selected by default, select Checked.

    The default choice is selected unless the viewer selects a different button or checkbox in the list.

    Note Only one radio button in a list can be the default button.

  7. Repeat steps 1 through 5 for each radio button or checkbox you want to add to the list.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Creating a pop-up menu or scrolling list

Pop-up menus and scrolling lists allow viewers to choose from a list of items. Viewers can choose one item at a time from a pop-up menu and make multiple selections in a scrolling list.

To create a pop-up menu or scrolling list:

  1. Choose Forms from the Insert menu and then choose Popup Menu.
  2. Select the pop-up menu and open its Object Editor.
  3. Assign a name to the element in the Name text box.

    The name of the element is used by the CGI script to locate the viewer's input.

  4. Type a number in the Items Visible text box.

    Type 1 if you want the element to be a pop-up menu. If you want it to be a scrolling list, type a value greater than 1 to specify the number of list items you want to be visible in the list.

  5. Click Edit Items.

    The Define Popup List dialog box appears.

  6. Type the names of the items you want to include in the pop-up menu or scrolling list.
  7. If you want to allow the viewer to select more than one item in a scrolling list, select Allow Multiple Selections.
  8. To make a particular item the default choice, click next to it in the dialog box.

    A checkmark appears next to the item in the dialog box.

  9. Click OK.

    In the case of pop-up menus, the default choice is displayed in the menu when the viewer is not using the menu and it appears in the menu with a checkmark next to it when the viewer is using the menu.

    In the case of scrolling lists, the default choice appears highlighted in the list. Be sure to make the Number of Items Visible value large enough so that the default item is visible when the viewer isn't working with the list.

Note You can make multiple items in a pop-up menu or scrolling list default items. Make sure that Allow Multiple Selections is selected, click next to all of the items, and for scrolling lists, make sure the Number of Items Visible value is large enough so that all of the default items are visible when the viewer isn't working with the list.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Adding a submit button

A form can have more than one submit button, each one specifying a different way that the information is processed. You need to include a submit button for viewers to send their information.

Submit buttons must call a CGI script to function properly. For this reason, you won't be able to test their functionality in Edit Page or Preview Page mode.

When you add a submit button to your page, the default text Submit appears in it. You can change this text if you want viewers to see something different. Simply select the text in the Submit button and type the new text.

To assign an identifying name to the button for use in a CGI script, select the button, open its Object Editor, and type a name in the Action Name box. (The default name is name.)

Using an image as a submit button: You can turn an image into a submit button, so that when the viewer clicks on the image, the form is submitted.

For information on other ways to use an image, see Making images interactive.

To use an image as a submit button:

  1. Double-click the image to open its Object Editor.
  2. Choose Form Button from the Behavior popup menu.

    An outline appears around the image indicating that it is a submit button.

 

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Adding a reset button

You can add a reset button to your form so viewers can clear their form entries and return the form to its default values. This is helpful if the viewer makes a mistake or wants to send new data.

Reset buttons must call a CGI script to function properly. For this reason, you won't be able to test their functionality in Edit Page or Preview Page mode.

When you add a reset button to your form, the default text Reset appears in it. You can change this text if you want the viewer to see something different. Simply select the text in the Reset button and type the new text.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Creating a hidden entry

Hidden entries allow you to supply additional information to the CGI script without displaying the information on your Web page. When viewers submit their forms, hidden entry data is sent to the server along with the data they have entered in the form.

To add a hidden entry to your Web page, choose Forms from the Insert menu and then choose Hidden Entry. A box appears with the word HIDDEN in it. Select the hidden entry, open its Object Editor and enter the appropriate values in the Entry Name and Entry Value text boxes. These values are sent to the CGI script when the viewer clicks a submit button.

Note Because hidden entries are invisible to the viewer, they don't appear when you view your Web pages in Preview Page mode or in a browser.

The following feature is only available in the complete version of Claris Home Page 2.0. When you're ready to upgrade, choose How To Upgrade from the Help menu.

Specifying a CGI script for your Web page

As mentioned earlier, forms need to call a CGI script in order to process the data that viewers enter. You can specify a CGI script for each Web page that contains a form.

To specify a CGI script for your Web page:

  1. Choose Document Options from the Edit menu.
  2. Choose Advanced from the pop-up menu or choose the Advanced tab to display the document options information.
  3. Type the name and path for the CGI script file on the server in the Form Action text box.
  4. Choose GET or POST from the Form Action pop-up menu to specify how you want the form data sent to the server.
  5. Click OK.