Controlling the Appending to a File

This page contains information about controlling what is appended to a file as a result of the form submission. What file is appended to and the format of what is appended is controllable and the fields of the form can be referenced.

This page is divided into a field reference section and an example setup section.

Example Append Setups

This section uses HTML 3 elements; if it doesn't make sense on your browser, look at this text version.

Desired SetupField has value of:
_append_comment_dir_appendfile_appendformat_append[n]_append_vals
Append some HTML text as specified in an external file with variable instantiation true the directory containing the file to be appended to the name of the file to append to the external file not set
Append some HTML text as specified inline with variable instantiation true the directory containing the file to be appended to the name of the file to append to not set the HTML (in symbol encoded format) not set
Append some fields in the default format true the directory containing the file to be appended to the name of the file to append to not set the fields you want appended or "all"
Nothing is appended not true the directory containing the count file not set

The Append Fields

_append
Meaning: If the value is true some text is appended to a file as specified with the following fields otherwise nothing is.
Applies: Always
Default: true
_comment_dir
Meaning: A full path to the directory in which comments (the output of the form) are stored.
Applies: When "_append" is true
Default: "/local/Web/comments". Reliance upon this default is discouraged.
Errors: if the specified directory does not exist or could not be changed to, an error will be reported and all processing will terminate.
_appendfile [new!]
Meaning: The file in the _comment_dir that will get appended to (the log file).
Applies: When "_append" is true
Default: "comments.html"
Errors: If the specified file does not exist or could not be written to, an error will be reported and processing will continue without an append having taken place. Note that if the file does not exits, it will not be created. This is done for safety reasons.
_appendformat [new!]
Meaning: If this field is present, then its value is interpreted as the full path to an external HTML file which is to be used as the format for what is to be appended to the log file. Variable-encoded format conversion is performed on this file.
Applies: When "_append" is true
Default: not present
Errors: if the specified file does not exist or is not readable, an error will be reported and all processing will terminate.
_append[n] (_append1, _append2, ...)
Meaning: If "_append1" is present, then these fields are appended in order to the "comments.html" file. Variable-encoded format and symbol-encoded format are used.
Applies: When "_append" is true and "_appendformat" is not present
Default: not present
_append_vals
Meaning: When the text to append is not specified with "_append[n]", this indicates what fields are to be put in a default format. This field is a whitespace separated list of fields to be appended in order or "all".
Applies: When "_append" is true, "_append1" is not present, and "_appendformat" is not present
Default: "all"

See Also

o Controlling the display
o Controlling the sending of electronic mail
o Variable encoded format
o Symbol encoded format

[GC Control Fields] [GC Home] [Jim's Home Page] [Please comment]
Copyright © by James Hoagland
www.hoagland.org | webmaster@hoagland.org
27 June 1995