Creating a Script for a Form

Cosmo Create lets you create simple cgi-bin programs based on the information that you enter in the Form Tool. To create a script:

  1. Create your form using the Form Tool.

  2. Place the insertion point somewhere in the form.

  3. Click the Script button in the Form Tool.

  4. In the Form Script dialog, enter a name for your script in the field next to the Create CGI Script button.

  5. In the script dialog, click the Apply button.

  6. In a shell, type mv script /var/www/cgi-bin to move your script to the cgi-bin directory.

You have created a simple Perl script based on the FORM variables. This script simply sends back to the client the form variables, their types, and values in a table. The script has all the typical boiler plate that you put in a CGI to parse the parameters and construct an associative key/value array. The script makes it easy for you to adapt the script to your needs.