NetForms User's Guide: Insertion Commands

NetForms insertion commands are used to insert the user entered information into the HTML "shell" contained in the FDML document. Each of the 9 commands available are described here, but make sure to look at the "Important Notes" section as well.


The commands used to insert text include...
<REPLACE FieldName>
Replace inserts text entered by the author in the entry form field "FieldName". The text could be from a fixed character string, a scrolling text area, pop-up menu, etc. There is also an extension command which has the form <REPLACE_FN FieldName>. Using RECPLACE_FN will convert slashes ("/") and colons (":") that the user entered into the field into periods (".") when the text is inserted. This extension can be used within the filename parameters for the CreateDoc and MenuDoc directives above so that colons and slashes are not mis-interpreted by the server. ("FN" stands for "File Name".)

<BULLET FieldName>
Bullet will create a bullet list, complete with <UL> and </UL> HTML commands. Each line entered into the text field by the author becomes a bullet point. This command is almost always used to process a scrolling text field, but any field type is supported.

<IF FieldName (=/#) "Comparison Constant" (then) "Insertion Constant">
If inserts the "Insertion Constant" if the conditional portion is True. In other words, the If command compares the author-entered contents of a field to the "Comparison Constant" for either equivalence (=) or non-equivalence (#). If this comparison is True, then NetForms inserts the "Insertion Constant". The word "then" may be used for readability but is not required. To check to see if a field was left blank by the author, two double-quotes with nothing between them ("") can be used as a Comparison Constant. For example, a common If usage is:

  <IF MyTextField = "" then "Sorry, no text entered in this text field.">

You may use Replace, Bullet, Date, and Time commands within the Insertion Constant.

Also, if you need a double-quote (") within the text of your Insertion Constant, then put two double-quotes ("") in the text. For example, the IF statement above could have read:

  <IF MyTextField = "" then "Sorry, no text entered in ""MyTextField"".">

so that if MyTextField were left blank, the inserted text would be:

   Sorry, no text entered in "MyTextField".

The double-quote pair can also be used in the Comparison Constant.


<DATE>
Inserts today's date. The date is retrieved from the system date of the machine running NetForms. If you want to use the Date command as part of a filename in the CreateDoc or MenuDoc commands, use the extension <DATE_FN>. This command will replace the slashes normally found in the date into periods so that they are not mis-interpreted by the server. ("FN" stands for "File Name".)

<TIME>
Inserts current time. The time is retrieved from the system time of the machine running NetForms. If you want to use the Time command as part of a filename in the CreateDoc or MenuDoc commands, use the extension <TIME_FN>. This command will replace the colons normally found in the time into periods so that they are not mis-interpreted by the server. ("FN" stands for "File Name".)

<LINKPREVIOUS>
This command allows you to add a hypertext link between the document currently being processed and the last document that was added to the same menu (in the MenuDoc directive). This allows users to navigate between articles which are on the same menu without having to constantly be moving back and forth between the menu document and the individual articles. In order to use this command, there must be a MenuDoc specified. Without a menu document, there is no way for NetForms to find the link to the previous document. The hypertext link will appear to the user as simply "Previous Article".

<LINKNEXT>
This command is identical to the LinkPrevious command except that the hypertext link inserted will be called "Next Article" and will point to the next article posted to the menu document after the current document. Actually, this command is not really processed until the next article is submitted. (This is the only command not processed when the article is first submitted.)

<MENUFILENAME>
You can use this command to specify insertion of a URL to the menu document of the newly created article. In most cases, this command is used to provide a hypertext link back to the new article's menu. Obviously, this command can only be used when a MenuDoc has been specified.

<HTMLFILENAME>
This command is not available within your FDML text. The HTMLFileName command is for use only in the MenuDoc directive and the text of the Response file. It is used to specify the path to the newly created HTML article so that links can be created to it. Used in the text of the Response article, you can allow the author to review their finished work. In the MenuDoc directive, HTMLFileName is virtually required to provide the link to the new article.

Important Notes:

There are a few rules you should always follow when creating an FDML file:


NetForms (C) 1994 by Maxum Development Corp.

Return to the contents page