The config.php file

The config.php file

The config.php file, found in your /global folder contains special settings for to your own Form Tools installation: database connection values, the root folder and URLs and other information. This file is unique to your installation and it's the only file in the script that you need to edit.

The config.php file content is generated by the installation script. It's NOT in the downloadable zipfile.

Whenever you do an upgrade, this file is never overwritten. Any custom settings should be stored in this file. Again: the downloadable zipfile containing the updated Form Tools contents will never contain a config.php, so upgrading is as simple as uploading the new files to your web server and logging back in. [Click here for a more complete discussion of upgrading].

If you've been sniffing around, you may have noticed that the library.php also contains variables defining these values - but DO NOT EDIT THEM THERE! The library.php file contains the default values for all application-wide settings; the config.php just overrides the ones that are necessary. This keeps everything nice and tidy and simplifies upgrading.

Required Settings

This is the base URL of the Form Tools installation on your server. e.g. You can either supply an absolute or relative URL. Note: if you include the full URL, make sure that the "www." part is either included or removed consistently; if you try to log in at but your $root_url is set to it will not work! (and vice versa).
The server directory path to your Form Tools folder.
The database hostname (often just 'localhost').
The name of the database. Most often, hosting providers provide you with some sort of user interface for creating databases and assigning user accounts to them. If you are creating a new database for Form Tools, I would recommend "form_tools" for clarity. Enter the database name here.
The MySQL username. Note: this user account must have privileges for creating new tables, in addition to adding and removing records.
The MySQL password.

Optional Settings

This should be set to true if you want to make a secure connection to the database server.
This value lets you define a custom database prefix for your Form Tools tables. This is handy if Form Tools will be added to an existing database and you want to avoid table naming conflicts. By default it it set to ft_. If you do not need to use a different value, you needn't define it in your config.php file: it is already defaulted to ft_ in your library.php file.
This controls the maximum number of pagination links that appear in the Form Tools UI (e.g. for viewing the submission listings page).
This offers support for unicode. All form submissions will be sent as UTF-8. This is enabled for all new installations.
This setting should be enabled prior to including this file in any external script that doesn't require the person to be logged into Form Tools. The API, for example, automatically sets this to false. This lets you leverage the Form Tools functionality in the outside world without already being logged into Form Tools.
For release candidates and main releases, this is set to 1 by default, meaning that only genuine PHP errors are displayed. For Beta releases, this is set to 2047 - all errors and warning are displayed, which can help with debugging.
This feature currently only has limited support in the code, but will be implemented more fully at a later stage. When set to true it provides detailed, technical reasons for errors that occur.
When enabled, this option pops open a Smarty console for each webpage, displaying the contents of variables available on the page.
This tells Smarty to create the compiled templates in subdirectories, which is slightly more efficient. It's not compatible on some systems, so it's set to false by default.
This determines the value used to separate the content of array form submissions (e.g. checkboxes in your form that have the same name, or multi-select dropdowns) when submitted via a query string for "direct" form submissions (added in version 1.4.2).
For module developers. This prevents the code from automatically deleting your module folder when you're testing your uninstallation function. Defaults to TRUE, but doesn't work on all systems: sometimes the PHP doesn't have the permission to remove the folder.
This setting lets you control the type of sessions the application uses. The default value is "php", but you can change it to "database" if you'd rather use database sessions. This affects all Form Tools accounts and determines the session type for forms that are integrated with the API.
This setting was added in 2.0.0-beta-20090614. It lets you define the location where temporary PHP sessions files should be created. Generally you won't need to define this value, but some hosting providers (e.g. iPowerWeb) require that you do so in order to use sessions.
This enables debugging for the API functions. Generally this just causes the database errors and other messages to be outputted along with the problem error code. Enabled by default.
Used in the ft_api_display_captcha function when displaying a CAPTCHA in your form. Please see that function for more information.
Used in the ft_api_display_captcha function when displaying a CAPTCHA in your form. Please see that function for more information.
This setting determines the header charset sent by the ft_api_init_form_page API function. Defaults to "utf-8".
Determines how long sessions last for the API. This value defaults to 1 hour (3600 seconds).
Permissible characters in a filename of files uploaded to Form Tools. All other characters are stripped out.
Special chars, required in password (optional setting through interface).
Special chars, required in password (optional setting through interface).
The size of the password_history setting in the settings table. Form Tools keeps track of the last 10 passwords, to (optionally) prevent users from re-using a password that they used before.
In Form Tools 2.1.0, when you search on a date field on the main Submission Listing page, you will see a javascript dialog window to let you search by range, before a date, etc. This setting controls the format of that date. This is deliberately simple: you have only two options: d/m/y and m/d/y.
Added in 2.2.3, this setting limits the Form Tools installation to only manage the number of forms specified here. This feature is disabled by default.
Added in 2.2.3, this limits all Form Tools forms to a certain number of fields. This feature is disabled by default.