Documentation

Changing the script location >> << Including the form on your web page

Using your own PHPMailer, CSS and Javascript

This script requires several Javascript functions and CSS definitions to be added to the page. Assuming you are not using the plain PHP mail version, this script also relies on the PHPMailer library.
These are stored in external files included with this script. Most web sites will already have their own CSS and Javascript files and some people may instead prefer to merge this script's files with their existing ones.

To merge this script's CSS and Javascript files with the web site's existing files the script must be prevented from loading the built-in files. To do this set the useExternalFiles property in the configuration to true :

1
$config['useExternalFiles'] = true;

This setting may only be changed in the global configuration file and has no effect in form specific configuration file.
The contents of all CSS and Javascript files can now be appended to the existing files and the originals included with this script deleted.

If the web site is already using the PHPMailer library then the script can use it instead and the duplicate version included with this script can be deleted.
The phpMailerRoot must now be changed to point to the location of the existing library relative to the base HTML document.

1
$config['phpMailerRoot']    = 'path/to/existing/PHPMailer/';

It is important that the path includes the trailing / character.
Currently this script uses PHPMailer v5.1; it will only be possible to use this property if the existing library is compatible with it.

Changing the script location >> << Including the form on your web page