Bienvenue sur Geeklog France, anonyme 15 novembre 2019 - 09:42


Root : Plugins : 
Category: Plugins
Tags: -
Date: 2016-02-15 16:06
Size: 115,66 KB
Version: 2.1.11
MD5: a85bbacd3281fd1aaaa42bde90beaadf
Submitter: hiroron
Rating: 0.00
Popularity: 1397   POP
formmail by staticpages.php. CSV output is available and more
This program was originally made for Japanese users.

If you already have a pemission of staticpages.PHP, please read from 3.

1. Login your geeklog site as admin and click 'group' of admin menu.
2. Edit 'static page admin' and check 'staticpages.PHP' to make PHP enable in static pages.

3. Go to 'staticpage' admin menu.
4. Click 'Creat New' and make a new staticpage. Copy staticpages_formmail_en.php and paste it in textarea. Uncheck 'In a block' box and save with 'execute php' option.
5. upload /images directory and files in it by FTP at public_html/images/ and vendor to public_html/vendor/
6. Add css, footer and header to your theme.
7. try to access yoursite/staticpages/index.php?page=formmail

This script is fully compatible with contact plugin. In contact plugin config:

  • Set Static page id for contact page header: id of the static page with the formail script on it
  • Set Use contact form to false

Old documentation

<setting text field max length>
add 'maxlength' in item setting. recommend to add 'valid_maxlen' as input error check as well.
array('type' => 'text',
'name' => 'q_name_1',
'size' => '40',
'maxlength' => '40', <--HERE
'class' => 'bginput',
'value' => $username

<input check items>
valid_require => '*' : check if blank not allowed item. You can change '*' string if necessary.
valid_equal => $essentia_email : check if equal with another colum => "email address double check"
valid_email => $propriety_email : check if email address => "email address check item"
valid_notzero => 'item name' : check if assigned item's sum is not zero (to be used such as hotel room reservation's guest numbers).
valid_numeric => 'item name' : check if numeric
valid_phone => 'item name' : check if proper phone number.
valid_maxlen => 'item name=max length' : check if text is in max length
valid_minlen => 'item name=min length' : check if text exceeds min length
valid_captcha => '*' : check for captcha

<text field max length>
You have 2 options in accordance to your needs!

I. Twitter like view with JavaScript to display allowed length remained
array('type' => 'textarea',
'name' => 'q_other',
'class' => 'bginput',
'style' => 'width: 95%; height: 100px;',
'onKeyup' => "var n=200-this.value.length;var s=document.getElementById('tasp1');s.innerHTML='('+n+')';" <--displays allowed length remained here. max=200. 'tasp1' is span id to display.
array('input' => '<br'.XHTML.">*input your inquiry here<strong><span id='tasp1'></span></strong><br".XHTML.'>'), <--displays in this span tag. id should be changed properly in case use this function at two or more textarea.

II. check posted contents and display error message if if exceeds the max lengthset
array('header' => 'your inquiry',
'valid_len' => 'q_other=200',
'error_len' => 'Please complete your inquiry within 200 characters',
'data' =>

<Inputting date by JavaScript calendar>

//This uses calendar library by:
// Calendar RC4, (c) 2007 Aeron Glemann, MIT Style License

I. default setting
Followings are default settings for using JavaScript and CSS to enable your favourable settings or to use other JavaScript library.

set TRUE for $use_jslib to enable JavaScript library. In case you don't, set FALSE.
# use of JavaScript library for calendar
$use_jslib = TRUE;

set calendar JavaScript as follows.
"q_date1" matches with the name of II.exmaple. Make sure to change both of them if you want to change it.
# declaration of JavaScript library etc
# JavaScript+CSS for calendar display
# Calendar RC4, (c) 2007 Aeron Glemann <>, MIT Style License
# (
$def_jslib = <<<JSLIB

<script type="text/javascript" src="{$_CONF['site_url']}/javascript/calendar/mootools.js"></script>
<script type="text/javascript" src="{$_CONF['site_url']}/javascript/calendar/calendar.js"></script>
<link rel="stylesheet" type="text/css" href="{$_CONF['site_url']}/javascript/calendar/calendar.css" media="screen" />
<script type="text/javascript">
window.addEvent('domready', function() { myCal = new Calendar({ q_date1: 'Y/m/d/' }, { days: ['SUN','MON','TUE','WED','TUE','FRI','SAT'], months: ['JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC'] }); });

II. example
set CSS 'calendar' in class to enable date input by calendar.
set float:left; at style to make input form and calendar icon in line.
name=>q_date1 matches with 'declaration of JavaScript library etc' in I.default setting mentioned above. Make sure to change both of them if you want to change it.
// < table 1 raw
array('header' => 'request date', 'data' =>
array('type' => 'text',
'name' => 'q_date1',
'id' => 'q_date1',
'size' => '20',
'maxlength' => '10',
'class' => 'bginput calendar', <--describe calendar here
'style' => 'float:left;' <--describe float:left to put calendar icon right side of input form
// > table 1 raw

<select email receipient by selected strings>
For example at travel agent's website, you can manage email receipient depending on city name the user selected.
-set $owner_email like blow.
-set item name to distribute email receipient, value of name.
 $owner_email_item_name = 'q_city';
-form should be like below.
array('type' => 'select',
                'name' => 'q_city',
                'style' => 'width: 10em;',
                'class' => 'bginput',
                'options' => array('selected' => 'please select', 'values' => 'please select="",Tokyo,Paris,HongKong'),

<set initial value by adding argument on URL>
add the following set at subject array
'value' => $_GET['variable']

File List for the Project: formmail

Titre File Version Size Date
Formmail Static Page 2.1.11 118436 2016-02-15 16:06