The mgiFileAppend Tag

Tag Behavior

The mgiFileAppend tag writes text to the end of a target file.


Tag Syntax

The mgiFileAppend tag has a beginning tag with one required parameter and no optional parameters, a body, and an ending tag. The tag form is:

<mgiFileAppend fileLocation="File Path">
MGI tags and text to be appended to the target file
</mgiFileAppend>

Required Parameters:

  • fileLocation="File Path" where "File Path" is the relative path to the target file where text should be appended. If the target file does not exist, it will be created.

Optional Parameters:

  • None.


Example Usage and Output

<mgiFileAppend fileLocation="contest.html">
Free Giveaway <mgiDate>
Entrant: <mgiFieldContent name="Name">
         <mgiFieldContent name="Phone>
</mgiFileAppend>

In this example, the mgiFileAppend tag is used to write contest entries to the contest.html file. If an entrant completes and submits a contest form, the text appended to contest.html will appear as:

Free Giveaway Sun, 11 March, 2001
Entrant: Sandy Jones
         (253) 421-5748

When the next contest entrant completes and submits a form, the information will be appended to the end of the contest.html file such as:

Free Giveaway Sun, 11 March, 2001
Entrant: Sandy Jones
         (253) 421-5748
Free Giveaway Sun, 11 March, 2001
Entrant: Jim Smith
         (749) 284-3391


Suggested Usage

  • Contest Submissions


[Return to the Referencing MGI Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]