The CGIScripter CGI - Fields folder tab contains fields
for entering Field-specific parameters which will be used to generate
Perl CGI scripts. CGIScripter generates Perl CGI scripts for each form
which is defined within the application interface, and enables the developer
to specify Field-specific parameters for the fields located on each
individual form. This feature permits a developer to configure a field
with one set of validation parameters within the Perl CGI scripts generated
for one form, and to use different validation parameters within the
Perl CGI scripts generated for the same field when it is used on a different
field: Display As
The default value for the Display As field content is the as the field
name. The field name may not be suitable for display on a web page therefore
this field provides a way to change the displayed name of each field.
field: Field Type
The Field Type menu is used to specify the type of data which will be
stored in the field. The following menu options are available for the
Field Type menu:
Text-Small - The Text-Small option is intended to be used for
defining fields which will store a relatively small amount of text within
the database. For Oracle databases this selection will utilize a VARCHAR2(4000)
column and for MySQL a VARCHAR(255) column will be used.
Text-Large - The Text-Large option is intended for storing large
amounts of text within the database column. For Oracle databases this
selection will utilize a CLOB column able to store up to 4GB of text
and for MySQL a TEXT column storing up to 65K of text will be used.
Number - The Number option is intended for storing numeric information.
For Oracle databases a NUMBER column is used, and for MySQL a DOUBLE
column is used.
Date-Time - The Date-Time option utilizes a DATE column with
Oracle databases which contains date and time information within the
same column. For MySQL databases a TIME column is used if the text 'time'
appears within the field name, otherwise a DATE column is used.
Image - The Image option is used for storing images or any other
binary data within the database. For Oracle databases a BLOB column
is used which allows up to 4GB of data storage per column and for MySQL
a LONGBLOB column is used which also allows 4GB of binary storage per
The Auto-Enter menu enables auto-enter values. Fields may contain Auto-Enter
Creation Time, Creation Date, Data, Modification Date, Modification
Time, Perl Calculation or Serial Number. The Auto-Enter Creation Date/Time
parameters are only used when new records are created. The Auto-Enter
Modification Date/Time parameters are only used when a record is updated,
not when it is created. The Auto-Enter Data parameter is a static value
consisting of text or numbers which is entered upon record creation
or modification. The static Data value needs to be entered into the
"Result =" field. The Perl Calculation parameter is used during
record creation and updating. The Perl code for the calculation needs
to be entered into the "Result =" field and does not need
to be terminated with a ";".
Tip: For situations in which differing behavior is required for database
record creation vs updating scripts, two different forms could be created.
One form would be used for inserting records and the other form could
be used for updating records. The insert data form could be configured
with a different set of Auto-Enter options compared to the options used
for the update data form.
field: Result =
This field is used for additional parameter specifications based upon
the value selected for the Auto-Enter menu. If using the Auto-Enter
Data or Auto-Enter Perl Calculation, the appropriate values or Perl
code need to be entered into this field. The Perl calculation may make
use of any existing Perl variables which have already been declared
in the output script at the time the Auto-Enter directives are processed.
Any syntax errors in the entered Perl code will cause the CGI script
to stop running (script processing errors can be found within the web
server error.log file).
The three options for this menu are None, Checkbox and From Value List.
If Checkbox is selected, the contents of the Display As field will be
used as the value submitted via HTML form pages. If the From Value List
menu item is selected, the values for the value list should be entered
into the Value List Items field. Value List items are used to build
Submit, Query and Delete HTML pages.
field: Value List Items
If the "From Value List" option is selected in the Display
Value List menu, the value list items should be entered in this field.
menu: Validate Data Entry
The options for this menu include None, Not Empty, Characters Only,
Numbers Only (allowing - . e and
E characters in addition to numbers), Integers Only, Numbers
and Characters Only and Email Address. These validation options are
checked during Submit and Update form processing.
field: Validate Numeric Range Low
If validation of a numeric range is required, the lower range should
be entered into this field.
field: Validate Numeric Range High
If validation of a numeric range is required, the higher range should
be entered into this field.
field: Number of Characters Min
If a minimum number of characters must be entered into the field, the
minimum number should be entered into this field.
field: Number of Characters Max
If a maximum number of characters should not be exceeded for the field,
this maximum number should be entered into this field.
field: Custom Validation Text
A standard generic error message is generated for each validation test.
However a custom error text message may be specified within this field
in order to override the standard message. This message will be displayed
for each validation error which occurs for the field. The text entered
within this field should be terminated by an HTML <BR> command.
All other HTML commands may be included as well.