Result Formatting Rules

Each action line is followed by a format section which described how the results of that action are to be displayed. The end of the format section is marked by a vertical bar | character on a line by itself. The | character is also used to indicate when the values from the form fields should be displayed in the results file. The pair || of bars will print a single | character.

If no rules line are given for an action (the ending | line is still needed), then a default collection of fields is printed. The default for the Require action is a message about which field did not match the required value. The default for all other actions is to display all of the data fields submitted with the form.

The format lines are printed with any field names surrounded by | characters are replaced with the value of the field. Any fields returned by the form submission or any CGI environment variable may be used.

The SampForm example demonstrates the use of the format lines including some of the advanced formatting rules.

|Name|

This prints the value of the field Name. If the field has more than one line of data, only the first line is printed.

|Address+|

This prints the value of the Address field including all of the lines of a multi-line field.

|Title^50|

This prints value of the Title field centered within a 50 column area.

|Name<20|

This uses exactly 20 spaces to print the value of the Name field (left justified).

|Money>20|

This prints the value of the Money field right justified within a 20 character area.

|Address+3|

Use exactly 3 lines to print the value of the Address field. (There is no limit on the length of each line, but only the first 3 lines will be used.)

|Address<40+3|

Print the value of the Address field in an area that is 40 characters wide and 3 lines long.

Back to Top