Attaching a Script to a Form

Cosmo Create lets you build a form quite easily. To make the form functional, you need to write a program, called a cgi-bin script, and place it in the proper location on the Web server. This section provides an overview of the steps involved. It does not explain how to write the script, however.

  1. Create the cgi-bin script. (You can use Cosmo Create to generate a script.)

  2. Place it in the proper location on the Web server.

    The default directory on a system running FastTrack is /var/www/cgi-bin. Check with your server administrator if you're uncertain about the location.

  3. If it isn't already open, open the Form Tool by choosing Tools > Form.

  4. Place your cursor inside the form area on the page, then click to make sure the form is active.

  5. Click the Script button on the Form Tool.

  6. Specify which cgi-bin script to use by typing its pathname in the Form Action field of the Form Script dialog.

    If you're unsure of the pathname, ask the server administrator for the correct pathname.

  7. Click GET or POST to specify how you want to package and send the form data.

    Unless you are familiar with these options and have a specific need for GET, use the default setting (POST).

  8. Click the Apply button.