Instructions (Page 2)


Scripting

A Custom Form Generator script is a text file which can be written in any ASCII text editor (like Windows Notepad, DOS Edit, even WordPerfect if saved as a text file.) This script simply contains a set of component definitions, in any order, that make up the components of your form. You do not need to define the components in the order you want them to appear, since use of the gridx, gridy and columnspan attributes will ultimately define where the component is placed. The only bearing component definition has is how the email will be sent. Name = value pairs will be e-mailed in the same order the components where defined.

A component definition consists of the following:

  • The header is followed by a series of variable settings for that component, each on it's own line, completed with a separate line that contains only the "}" symbol to notify the end of the component definition.

    Each variable definition begins with the variable name (see below) followed by the '=' symbol, then the variable's value is placed inside "" marks. The line is terminated by a semicolon (;).

    (i.e. name = "Company"; )
    Again, keep in mind that the parser is case insensitive and any amount of whitespace (spaces) is allowed. However the following rules do apply: The available variables depend on the component you are defining:

    [ name | width | height | columnspan | rowspan | gridx | gridy | passwordchar | checked | option | verify ]
    • name = "string";

      Works with:

      • Textfield
      • Textarea
      • Choicebox

      The name attribute assigns a name to the component and will be the left hand side of the "name=value" pair that is sent in the email.

      For example, if you have a Textfield with the name set to "Company" and the user fills in "Lamatek, Inc.", your email would contain a line: Company = Lamatek, Inc.

    • width = "integer";

      Works with:

      • Textfield
      • Textarea
      • Recipient
      • Subject

      The width attribute defines the components width (in characters). Please note that Label, Checkbox, Radio and Choicebox width are defined by the amount of text they contain. The submit and clear buttons have a set size.

    • height = "integer";

      Works with:

      • Textarea

      The height parameter defines the height (in lines of text) for a Textarea.

    • columnspan = "integer";

      Works with:

      • Label
      • Textfield
      • Textarea
      • Recipient
      • Subject
      • Checkbox
      • Radio
      • Submit
      • Clear
      • Choicebox

      Columnspan defines the number of columns the component should occupy. Note: The most popular use of columnspan is when you need a component to be larger than the other components in it's column, but you don't want the extra space to be distributed to all the other components.

    • rowspan = "integer";

      Works with:

      • Textarea
      • Submit
      • Clear

      Similar to columnspan, rowspan defines the number of rows to allot to a component without affecting the components around it.

    • gridx = "integer";

      Works with:

      • Label
      • Textfield
      • Textarea
      • Recipient
      • Subject
      • Checkbox
      • Radio
      • Submit
      • Clear
      • Choicebox

      Gridx defines the column to begin the component in. If the component occupies more than one column (as defined in columnspan), the component will begin in the column defined in gridx and continue to the right.

    • gridy = "integer";

      Works with:

      • Label
      • Textfield
      • Textarea
      • Recipient
      • Subject
      • Checkbox
      • Radio
      • Submit
      • Clear
      • Choicebox

      Gridx defines the row to begin the component in. If the component occupies more than one row (as defined in rowspan), the component will begin in the row defined in gridx and continue down.

    • passwordchar = "char";

      Works with:

      • Textfield

      If password is defined, the Textfield is assumed to be a secret one. Therefore any text typed in to the Textfield will be replace (on the screen only) with the character defined. Please note that the value itself is not replaced and therefore your email will accurately reflect the correct information.

    • checked = "true | false";

      Works with:

      • Checkbox
      • Radio

      The checked parameter tells Custom Form Generator whether to create the component initially checked ("true") or not checked ("false"). Please note that in a radio grouping, only one radio can be checked at a time.

    • option = "string";

      Works with:

      • Choicebox

      The option parameter adds an option to a Choicebox. Please note that options will be added to the Choicebox in the order they are defined.

    • verify = "true | false";

      Works with:

      • Textfield
      • Textarea

      The verify parameter tells the Custom Form Generator applet to verify that input was made on that component before sending the email. If no input was read, the email will not be sent and a notification will be shown. Please note that this parameter only functions if the <PARAM NAME=verify VALUE="true"> tag is used on the HTML page.

  • The variable settings are completed by the "}" closing tag. This tag can appear any number of lines below the last variable setting, however, it must be on it's own line.

    A script file is terminated by use of the "END_FILE" tag. This tag notifies the parser to stop reading and compiling. There are specific requirements for use of this tag:

    • The tag must appear at the end of the file.
    • The tag must appear on it's own line.
    • The tag must appear as is with no punctuation or white space. (i.e.    END_FILE   ).

    And that is the Custom Form Generator scripting language. Below is a summary of the available components and their legal parameters:

    Textfield {
       name = "string";
       width = "pixels";
       columnspan = "integer";
       passwordchar = "char";
       gridx = "int";
       gridy = "int";
       verify = "true|false";
    }
    Textarea {
       name = "string";
       width = "pixels";
       height = "int";
       columnspan = "integer";
       rowspan = "integer";
       gridx = "int";
       gridy = "int";
       verify = "true|false";
    }
    Recipient {
       width = "pixels";
       columnspan = "integer";
       gridx = "int";
       gridy = "int";
    }
    Subject {
       width = "pixels";
       columnspan = "integer";
       gridx = "int";
       gridy = "int";
    }
    Checkbox {
       label = "string";
       columnspan = "integer";
       gridx = "int";
       gridy = "int";
       checked = "true | false";
    }
    Radio {
       label = "string";
       columnspan = "integer";
       gridx = "int";
       gridy = "int";
       checked = "true | false";
       groupname = "string";
    }
    Label {
       text = "string";
       columnspan = "integer";
       gridx = "int";
       gridy = "int";
    }
    Submit {
       columnspan = "int";
       rowspan = "int";
       gridx = "int";
       gridy = "int";
    }
    Clear {
       columnspan = "int";
       rowspan = "int";
       gridx = "int";
       gridy = "int";
    }
    Choicebox {
       name = "string";
       columnspan = "int";
       gridx = "int";
       gridy = "int";
       option = "string";
          :
       option = "string";
    }
       


    For more information on additional Internet applications provided by the design team at N.S.S., Inc., please review our Products Profile page, our feel free to browse our entire site.

    It's easy to see that unless the N.S.S. button is on your site, you probably paid too much!

    Created by