Changing the captcha image style >> << Creating the mail template
You may override settings on a per form basis by providing form specific configuration files.
The script will look for form specific files in the forms directory (php/SimpleContactForm/forms/
).
To create a form configuration file create a file named FORM-NAME.configuration.php
inside of the form directory and
replace FORM-NAME
with the name you have given the form.
This form will be loaded when the form is created and all the settings inside of it will override the settings in the
main configuration file only for this form.
If needed you may access the configuration settings directly to read or modify its value :
1 2 3 4 | // Directly read a configuration value : echo $this ->config[ 'smtpPort' ]; // Override a setting directly : $this ->config[ 'smtpPort' ] = 25; |
You may also create a new $config
array to override settings :
1 2 3 | $config = array (); $config [ 'useSmtpServer' ] = true ; $config [ 'smtpPort' ] = 25; |
All value set in this array will over write the values set in the read from the main configuration file.
If you have multiple forms on a single website with different fields you will need to create individual fields
configurations for each unique form.
Per form mail templates are also loaded from the form directory.
The mail template file name has the following format : FORM-NAME.template.html
.
See Creating the mail template for more information
on creating mail templates.
Per form Javascript and CSS files are loaded in same way; The script will look for files in the form directory names :
FORM-NAME.script.js
for Javascript files and
FORM_NAME.style.css
for CSS files.
Changing the captcha image style >> << Creating the mail template