Get Help

About Telegraph Config (.xml) Files

Telegraph uses a separate XML-style configuration file to control form actions. To add a new action to a form (e.g., emailing form input), simply add a line of code for the corresponding Telegraph directive.

Naming and Creation

  1. Navigate to your form’s parent directory.
  2. Create a subdirectory named telegraph.
  3. Navigate to the subdirectory telegraph.
  4. Create a file named config.xml. (Note: you can rename this file according your needs; however, make sure that its name matches that contained in the form_configuration tag on your form:
  • <input type="hidden" name="form_configuration" value="telegraph/config.xml" />

Formatting

The standard Telegraph directives follow a basic XML tag format:

<directive action="_____" />

Make sure that your tag opens correctly and self-closes properly, in a valid markup format. Each directive should be placed on its own line; no other code needs to be added. Telegraph will ignore any information not contained within the configuration file’s XML tags.

Complex Tags

One of the simplest directives, Imperius, requires only a single parameter, the action:

<directive action="imperius" />

A particular directive may require additional parameters, or allow them to be added for additional functions. The email directive, for example, requires the to parameter, indicating where the email is to be sent.

<directive action="email" to="fred.flintstone@example.com" />

You can also add additional parameters within a directive:

<directive action="email" to="fred.flintstone@example.com" from="[email] subject="Granite Orders" template="orders.template" />

Special Directives

Special directives use the basic format:

<directive special="_____" />

Aside from substituting special for action, they use the same format as the standard Telegraph directives.

Additional Details

For additional details, see the complete list of directive parameters and our set of Telegraph example code.