You are here: Home > Form Mailer

Dansk

Form Mailer

Formmail is a Secure Form Mailer script from Dagon Design with customization for CMSimple. It's a CMSimple plugin without administration part and all configuration is done by editing some variables in php files. Configuration is well documented by Dagon Design so if you know anything about php, ftp and editing files then configuration is very easy. Otherwise don't use it.


Dagon Design script "has a wide range of features including: an easy to use dynamic form generation system (any number of fields, in any order), multiple recipients, multiple file attachments, optional auto reply feature, an image verification system, numerous security features (including protection against email header injection), a message template system, multiple languages, and too many other things to list. This script was designed to be easy to use, while still being extremely flexible. If you just want a simple contact form, you can set one up with just a few clicks. For those of you who need something a bit more advanced, you can completely customize script plugin to fit your needs - whether it is 5 fields or 500. ReCaptcha support has also been added, as well as support for storing the data in a delimited file."

The CMSimple version is extended by  

  • posibility to create unlimited number of forms in same cms. 
  • posibility to define a manual template for each form to replace basic layout.
  • posibility to redefine some part of standard configuration in each form.
  • spam protection by Akismet (you need to get af key at http://akismet.com/personal/ to use this option).
  • some addtional security checks.
  • optional replacement for CMSimple's build-in mailform
  • Integration to Variable Content plugin
  • Integration to Tooltip plugin
  • Integration to TableTool plugin (can be used to diplay new Form Maier form entries on the fly in registration, voting, etc.)
  • hidden fields
  • Optional invoice number
  • javascript on input, check boxes and radio buttons
  • User defined function
  • This plugin does not require use of cookies.

1. License

GPL3. You are allowed to make code changes in this plugin to tailor it to your needs.This plugin is for personal use and you may not redistribute either original or modified code. By downloading this plugin you agree to this limitation to the GPL license.

 

2. Installation 

Download and uncompress formmail.zip
Upload the entire formmail directory to  your "plugins" directory. Log directory and the file in directory requires chmod 666. 

3. Configuration 

All configuration must be done in files: config/forms.php and config/fm_config.php.

forms.php contains form definitions and layout definitions.
fm_config.php includes all other configuration.

The  original Dagon Design documentation is on http://www.dagondesign.com/articles/secure-php-form-mailer-script/ .

Dagon Designs Secure Form Mailer includes many translations. This translations are placed in "lang" directory of formmail in plugin folder.

To activate Form Mailer insert:


{ {{formmail($form_struc_test);}}} or
#CMSimple  $output= preg_replace("/".chr(35)."CMSimple.*".chr(35)."/",  formmail($form_struc_test) , $c[$s]);#

somewhere on your page and make definition of $mine_form_struct in config/forms.php. The installation version includes the test configuration of the form shown in FormMailer Demo.

To integrate Variable Content on your formmail page insert: 

{ {{vcontent(formmail("$form_struct_test"));}}} or

#CMSimple  $output= preg_replace("/".chr(35)."CMSimple.*".chr(35)."/",  vcontent(formmail($form_struc_test)) , vcontent($c[$s]));#


Formmail replaces CMSimple's built-in mailform. To turn this option off set $form_struct_mailform=''; in config/forms.php.

Optionaly you can call function formmail() with a second parameter to use manual form (layout) definition. Please refer to Dagon Design manual for explanation of how to make a manual form. In CMSimple define your manual form in config/forms.php form and call formmail with to parametes:
formmail($form_struct_test, $manual_form_test);.  

4. Compatibility 

The Form Mailer plugin is tested with CMSimple_XH versions 1.6.7 and is php 7 ready.  

5. History

version 2.0.0 August 2016

  • php 7 ready
  • 2lang bug fixes
  • Integration to Tooltip plugin.
  • Integration to TableTool  plugin with possibility to, on the fly , show selected information saved in log files. Can be used to show results of registration, voting etc.
  • Log files are moved to content/plugins/formail folder. NB! log files created by 2lang subsites are saved in same file as files from the main site.
  • Added field save_path to form_structure. This field must contain a legal file name with readable file type eg "test_log.txt" and is saved in content/plugins/formmail folder.
  • Added class notranslate on select and chkbox fields to prevent google translation of content of these fields
  • Added maintenance functionality to lock log files during edition in plugin tabletool. Files (except contact_log.txt are locked for a period of time specified in tabletool plugin configuration or shorter, if file maintenance is finished before specified maintenance time. During maintenance the form is replaced with a text defined in tabletool plugin.
  • Added configuration variable max_entries specifing max allowed entries in the form. When this number is exceeded, the form is redirected to the next hidden(?) page (may be subpage)). This page should contain some explanation, or a new form eg an waiting list. Usefull when the form is a subscription to an event with limited number of participants.

version 1.8 Marts 2010

  • added variable $fm_charset to define the character set in mails and forms default is utf-8.  

version 1.7 December 2009 

  • Rewrited to XH requirements. 

version 1.6 November 2009 

  • Added option javascript on type=checkbox - javascript=> javascript=onclick=if (this.form[\'fm_checkbox\'].checked) {....;}
  • Added place holder <nl> for new line in $form_struct_xxx autoreply strings (auto_reply_message and auto_reply_message_end)
  • Added user defined function user_function(). after mail is sent it is possible to execute user defined code and call functions in other plugins:
      if $form_struct==$form_struct_test) {
       $email=isset($_POST['fm_email']) ? $_POST['fm_email'] : $_GET['fm_email'];
       if ($email=="xxx") do something;
      }
  • Added automatic switch to basic protection on Akismet error. After Akismet error user must resend form to activate basic or recaptcha protection. That means that a spam robot must resend a form twice to send spam. You can activate this option in config/fm_config.php, akismet section. You can give some user instruction in defines of AKISMET_ERRMSG and AKISMET_NOT_AVAILABLE_ERR in your language file of formmail. Changing to basic spam protection requires that you keep the line type=verify|class=fmverify|label=Verify in your $form_struct_xxx definition rewrited basic verification - added backgroundgreed for better protection. 

Version 1.5 

  • Defined new type=hidden - uses same options as type text
  • Added new option to type=text: readonly=true 
  • Added new option to type=text: javascript f. ex. javascript= onchange= "this.form[\'f1\'].value= this.form[\'f2\'].value * 2;";
  • Added new option to type=radio: javascript f. ex. type=radio| class=fmradio| fieldname=fm_form1| label=Choose one|req=true| data=xxx,yyy,zzz,qqq|javascript= onclick= "if( this.form [\'fm_form1\'].xxx.checked ) alert( \'you choosed xxx\' );"
  • Added new default option to type text: default=counter, generates a unique number.
  • Added an anchor "formmail" before form tag ant the link to anchor in variable $path_contact_page
  • Added delimiter option on types: checkbox, radio and select. This option replaces Dagon Designs default "," (comma) as the delimiter with user   definded delimiter. It can be ";" or "$," or anything else. Remember to use the same delimiter f. ex.: data=XX á € 50,00.;YY á $ 50.00;ZZ|delimiter=; 

Version 1.4   

  • Added integration to plugin Variable Content (vcontent) plugin - usage value=#my_vcontent_variable#. You need to install vcontent plugin.  

version 1.3 (january 2009) 

  • Added anchor to the form (after submit the page is postioned at the form and error messages).
  • Added javascript option on type text and radio 

version 1.2 

  • Added field type hidden
  • Added property readonly on text fields
  • property default on text and hidden fields can be set to counter (default=counter) and then generates a unique identification number to be passed with the form. 

version 1.1 

  • Added more compatibility
  • Added new fields in all language files (in English).
  • Formmail replaces build in mailform (optional).

6. Known problems 

  • If enclosed between paragraphs <p> on your page ,as most editors will do, the FormMailer will validate with error. According to W3C standards, the <form> tag may be not placed within a paragraphs. 
  • Recaptcha can some times cause an javascript error in IE 8 (HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)). No work around available. 

7. Disclaimer

This CMSimple plugin is distributed in the hope that it will be useful - without any warranty; without even the implied warranty of fitnes for a particualr purpose.

© simpleSolutions, November 2008. 

Submenu



  |   top   |  

 

 

All plugins on this site are validated according to CMSimple_XH standard

 

 

 


Newsbox Rotator demo

Hints

Hold the cursor over Newsbox Rotator area to pause rotation.Move the mouse outside area to continue rotation.

In CMSimple XH not published news are not visible in News Rotator.

 

  

Newsbox Rotator demo

Newsbox Rotator Test 1

Newsbox_1 test test test


 

test1 test2 test3 test4 test5 test6 test7 test8 test9

Newsbox Rotator demo

CMSimple plugin: Newsbox Rotator
v.2 © simpleSolutions

Last update:
June 13, 2017, 16:22

Powered by CMSimple | Template by simpleSolutions

(X)html | css | Login