Diese Hilfedatei auf Deutsch: hier
klicken
|
The advanced form plugin is used to create mail forms, which can be integrated into any CMSimple page by means of the CMSimple scripting command. I developed this plugin because I noticed in the forum posts, that there were quite a lot of request for an easy to implement mail form. I had previously altered Peter Harteg's inbuilt mail form. Disclaimer : No warranties whatsoever, use at your own risk !
Requirements : The CMSimple plugin loader must be installed and operational !
#cmsimple $output=showadvform('Default Form');#
change all folder permissions to 750 (chmod 750)
change all files in the root of the advancedform folder to 440 (chmod 440)
- config folder: contains the configuration file (config.php) which holds all plugin related configuration settings.
Set the config.php file permissions to 660 (chmod 660)
![]()
Set both data files forms.dat & formsdetails.dat file permissions to 660 (chmod 660)
Set the help.html file permission to 440 (chmod 440)
Set all images file permissions to 440 (chmod 440)
If your native language isn't included in this language
list, you are encouraged to contribute to this plugin by translating
the plugin messages into your language and sending them to: plugin@jat-at-home.be . The translation will be included in the advancedform plugin package.
Your effort is much appreciated...
Set the language file permissions to 660 (chmod 660)
The settings above are valid for my own website (i.e.. hosting provider). Depending on your own hosting, other settings may be necessary. Below are the folder / file access rights (permissions) of one of the beta testers:
General permissions
- all folder permissions chmod to 755
Root folder file permissions
- all files in the root of the advancedform folder chmod to 644
Config folder file permissions
- config.php chmod to 666
Data folder file permissions
- forms.dat & formsdetails.dat file permissions to 666
Language folder file permissions
- language files chmod to 666
Other folder file permissions
- all other files chmod to 644
The Advanced Form plugin is installed now
Before you can use the Advanced Form plugin, it's necessary to
The configuration settings of the Advanced Form plugin are integrated into the CMSimple administrative module. So, first login into this module.
Select AdvancedForm from the list of available plugins.
Select Configuration settings from the dropdown list.
- check referrer domain: yes/no
- used to verify if the form is send from a specific site (i.e.. domain)
- yes : before sending the form the current address is checked against these given in the referring domains.
- no : no domain(s) check is done.
- referring domains : [string]
- enter the domain name(s) from where the form can be send.
- example: http://www.jat-at-home.be (only used when check referrer domain is set to yes)
- to name : [string]
- here you must enter the name of the receiver of the form
- example: webmaster @ jat-at-home
- to mail : string [,string]
- here you must enter the e-mail address of the receiver of the form
- multiple e-mail addresses are allowed, but they must be separated by a colon
- example: jan.kanters@telenet.be
- cc mail: [string [,string]]
- here you must enter the e-mail address of the Cc receiver of the form
- multiple e-mail addresses are allowed, but they must be separated by a colon
- example: info@jat-at-home.be,plugins@jat-at-home.be
- bcc mail: [string [,string]]
- here you must enter the e-mail address of the Bcc receiver of the form
- multiple e-mail addresses are allowed, but they must be separated by a colon
- example: info@jat-at-home.be,plugins@jat-at-home.be
- auto response : yes/no
- yes: send an auto response message to the e-mail address specified by the person who filled in the form
- no: don't send an auto response message
- auto response summary: yes/no (not implemented yet)
- yes: include the filled in form information in auto response message
- no: just send the default auto response message
- thanks page: string
- here you can specify the name of the CMSimple page you want to redirect to when the form is successfully filled in (this can be a hidden page)
- format: %pagename%%URI separator%pagename%[%URI separator%pagename]
- example: Contact_Us:Thank_you_page
please remember :
- replace spaces with underscore in page names
- CMSimple page names are CasE SenSitiVE
- when this entry is empty, a default thank you message is displayed.
- message format: string
- html: sends the form in HTML format
- text: send the form in PLAIN TEXT format (currently not implemented yet)
- form column layout: string
- 1: one column form layout
- format:
%FIELDLABEL1%
%FIELDNAME1%
%FIELDLABEL2%
%FIELDNAME2%%FIELDLABELx%
%FIELDNAMEx%- 2: two column form layout
- format:
%FIELDLABEL1%: %FIELDNAME1%
%FIELDLABEL2%: %FIELDNAME2%%FIELDLABELx%: %FIELDNAMEx%
The language settings of the Advanced Form plugin are integrated into the CMSimple administrative module.
So, first login into this module.
Select AdvancedForm from the list of available plugins.
Select Language settings from the dropdown list.
![]()
Change the language settings according to your needs and use the save button to save the modifications you make.
By default, the Advanced Form plugin automatically selects the language file according your CMSimple selected language settings. Example: when your CMSimple default language is set to German, the Advanced Form plugin language will also use the German plugin language file. If your CMSimple selected language file isn't available for the plugin, then the english language file is used. (If you want to add a new language file, please just copy then en.php language file located in the language folder of the advancedform plugin, rename the file xx.php where xx represents your desired language.
Once the new xx.php language file is available, you can start translating the plugin language settings as described in the
procedure above.
The form settings of the Advanced Form plugin are now found in the CMSimple settings module.
So, first login into this module.
Select AdvancedForm from the list of available plugins.
Select Form settings from the dropdown list.
![]()
- make sure the available forms is set to - Please select -
- select the new form button
- enter the number of desired form fields and press the OK button to confirm
- specify a unique form name & title
- specify for each form field :
- field description: the text (label) you want to display for the field
- field name: the internal name for the field
- field type: select a field type from the list
- field properties: additional field type parameters
- set required field (if needed): check this if this is a required field
when entering (clicking ) the properties field, you can define fieldtype specific properties.
![]()
press the Save button
decide if the field must be filled by checking the required box
- repeat the procedure for the other fields
- when satisfied with your form definition, press the Save button
Currently, the following field types are supported:
- Text: generic text input field; can contain numbers, signs and characters
- Sender's name: same as the field type 'text', but used in the form to indicate the sender's name (used in the form for the From: %sender's name% <%sender's email%>)
- Sender's email: same as the field type 'text', but used in the form to indicate the sender's email (this field will be verified as a valid e-mail format - this doesn't implicate that the e-mail address really exists and used in the form for the From: %sender's name% <%sender's email%>)
- Generic email: same as the field type 'text', but used in the form to indicate the sender's email (this field will be verified as a valid e-mail format - this doesn't implicate that the e-mail address really exists)
- Radio: radio button input field
- Checkbox: checkbox input field
- Select: dropdown list
- Select Multiple: multi-selection list
- Textarea: multi-line text input field
Field type properties
- Text - Sender's name - Sender's email and Generic email
Size: in characters
Maxlength: in characters
- Radio - Checkbox - Select and Select Multiple
Value: text you want to appear in the object
Options: list of entered values
Up: move the selected value up
Down: move the selected value down
Delete: delete the selected value(s)
- Textarea
Cols: number of columns of the textbox
Rows: number of rows of the textbox
Wrap: text wrapping within the textarea
- Hard
- Soft
- Off
- select the form you want to modify from list of available forms
- make the modifications where needed
- save your changes by pressing the Save button
- make additional modifications where needed
- modify the number of form fields
- press the modify # fields button
- enter a numeric value for the number of fields and press OK
- the form will be adjusted to the new number of fields
![]()
- modify the field as needed (for details please see Create new form)
- remarks
- as long as you don't save the modified form, you can increase / decrease the number of form fields and retain their settings (if you don't change them of course)
- it's not possible for the moment to insert fields at a given position
- save the modifications when you're done
- select the form to delete from the list of available forms
- select the delete form button
- confirm the form deletion (by pressing Yes)
- press OK to return to the form settings module
- the selected form has been deleted now
Integration into a CMSimple page
Create a form on a CMSimple page
The advanced forms are called by means of a special function named : showadvform().
This function has only one required parameter:
If you want to use one of your defined form(s) on a CMSimple page, please follow the steps listed below:
#cmsimple $output=showadvform('%name_of_your_form%');#
example : #cmsimple $output=showadvform('Mail Form');#
Create a link to the page containing a form (optional)
The link to your form page is called by means of a special function called showadvformlink().
This is useful in creating a link on the template, or for calling the form by means of CMSimple Scripting.
This function has two parameters:
To display a (hyper)link to the page containing your form within your template., please follow the steps listed below:
Add the following php script into the template code on the location you want the link to your form to appear:
<?php echo showadvformlink(%form_page_name%,%form_link_title%');?>example : <?php echo showadvformlink('Contacteer:Contact_Formulier','Contact Us');?>
- where %form_page_name% is the CMSimple page name where you integrated the form, between quotes (' ').
- include the full path to the page containing the form.
- when you specify a non existing page, you'll get an error message when selecting the hyperlink
![]()
- please remember :
- replace spaces with underscores in the page names.
- CMSimple page names are CasE SenSiTiVE.
- the %form_link_title% is the text of the hyperlink, between quotes (' ')
- when this parameter is empty, the CMSimple menu mailform text will be displayed as default hyperlink.
- is not CasE SenSitiVe and may also contain spaces
Some idea's found in several different formmailer and samples of
form generator php scripts from various resources on the internet.