ASform

Plugin for CMSimple

Version 2.8

Example 1

Image 1: ASform with three input fields two of which are required fields.


Beispiel für den Templatekode

Image 2: ASform with six input fields three of which are required fields.


Beispiel für den Templatekode

Image 3: ASform can freely be positioned.


ASform is an easy-to-use formmailer for CMSimple. It is supposed to replace CMSimple's own rather meager formmailer. Its version 1.0 had originally been developed by Astrid Schäfer. This present version has highly been changed and upgraded by NMuD. The changes include three more optional input fields, optional mandatory fields as well as more styling possibilities by extended CSS usage. In addition, this new version is multilingual. In addition this version of asform makes now sure, that the formmailer can be used only from within CMSimple. Misuse by external users should be impossible from now on.

ASform can freely be positioned. That means: The plugin can be placed inside the content, which then will float around the plugin (see Image. 3).


1. Installation

After decompressing the "asform.zip" file the resulting asform folder with its files is copied into CMSimple's plugin folder.

To activate the formmailer you generate a new CMSimple page with a specific CMSimple script. This installation script offers two possibilities.

  1. Normal plugin output (s. Immage 1 + 2), or
  2. Positioned plugin output (s. Immage 3)

1. Normal Plugin Output:

Here you add the follwing script:

#CMSimple $output .= asform();#

Keep the dot (.) in front of the equal sign (=) in mind! It is important for correct function of the plugin. Hereby, the output of the script is shown below any content which may have been added to this page, despite of the position of the plugin's installation script.

If the email should be sent to another recipient than defined in the plugin's configuration or in CMSimple, enter the following script:

#CMSimple $output .= asform("","mail1@address.com");#

Hereby "mail1@adress.com" is an additional email address, which overrides the email address defined in CMSimple's and the plugin's configuration.

It is also possible to send the contact mail to multiple recipients:

#CMSimple $output .= asform("","mail1@address.com; mail2@address.com; mail3@address.com; mail4@address.com; mail5@address.com");#

Hereby, it is important that the first term in quotation marks in asform("","xxxxxx") remains empty! Otherwise, you'll have problems. However, the empty quotation marks must be included.

2. Positioned Plugin Output:

Here you add the follwing script:

#CMSimple $output = asform("position");#

Keep in mind, that in this case no dot (.) is allowed in front of the equal sign (=)!!! This is important for positioning!!!
However, instead of "position" you say "left", "right" or "center". For right positioning it would say:

#CMSimple $output = asform("right");#

You can place this script where ever you want. Even between words inside of a sentence. Starting at this point the position of the mailer takes place.

As with the "normal plugin output" (see above) also here individual recipients can be specified:

#CMSimple $output = asform("left","mail1@address.com");#

or

#CMSimple $output = asform("right","mail1@address.com; mail2@address.com; mail3@address.com; mail4@address.com; mail5@address.com");#

Subfolders (h2, h3) are possible, of course. After saving the new page and leaving the EDIT mode a call of the fommailer page should bring up a page which should look like it is shown in Image 2. Using configuration in EDIT mode enables you to change the look and the functionality of ASform plugin. For example, you can deactivate input fields you do not need (see Image 1). Each field can be configured separately as mandatory. Just the little math calculation functioning as Captcha is required and cannot be inactivated.


2. Configuration


In the configuration menu of this plugin we see the following:

data-reply
data-reply:
extrafield
extrafield field3:
extrafield field4:
extrafield field5:
form
form email field size:
form field3 field size:
form field4 field size:
form field5 field size:
form name field size:
form textarea cols:
form textarea rows:
required
required color:
required email:
required field3:
required field4:
required field5:
required name:
required text:
sender
sender Email Address:
sender From Text:
subject
subject:
webmaster
webmaster:

data-reply: true/false - activates the return of the data on the reply page which have been put in to the form by the user. Inactivation of this option generates just a static standard page the text of which can be adjusted in the language configuration.

extrafield: true/false - here, you can activate up to three additional input fields. Field names are changed in the language configurations.

form: Here you add the parameters for input field length. In case of the text field you can also adjust its height.

required: true/false and color option - here you define which fields should be mandatory fields. Mandatory fields are marked by a star [*] the colour of which can be defined in the color-field.

sender: sender Email Address: true/false - if "true", the recipient receives the sender's email address in the header section of the email (FROM:me@home.com). if "false" the text in the "sender From Text" field will be shown. This text should not contain special characters or umlauts. If sender Email Address = false and sender From Text = empty, the IP of the email server is shown.

subject: The text added to this config field will be shown in the subject line of the email you receive if a user uses the mail form. It should not contain special characters or umlauts.

webmaster: The email is sent by the user to the address which has been added to this config field. If you leave this field free, the email uses the main email address which you have added in your main CMSimple configuration.

3. Compatibility

ASform has positively been tested in conjunction with CMSimple v.3.2.

4. Bugs

So far no bugs have been found. If you do so, please, report it in the discussion of the ASform page on CMSimplewiki.

5. Disclaimer

There is no warrenty using this plugin. It will be used on everybody's own risk. We will not assume any liability in case of data losses caused by ASform usage.

6. Acknowledgement

Version 1 of the ASform plugin had been developed by Astrid Schäfer. This version offered two fixed mandatory input fields and one mandatory text field. This upgrade is based on the original code of version 1 which, though, have highly been changed and extended.

 

© Tillman Schuster, NMuD, May 2009.