6 * @package {$project_id}
11 * Index form implementation
15 * @package {$project_id}
18 class {$project_id}_Form_Index extends {$project_id}_ActionForm
22 * @var array form definition.
26 * TODO: Write form definition which this action uses.
27 * @see http://ethna.jp/ethna-document-dev_guide-form.html
29 * Example(You can omit all elements except for "type" one) :
33 * 'type' => VAR_TYPE_INT, // Input type
34 * 'form_type' => FORM_TYPE_TEXT, // Form type
35 * 'name' => 'Sample', // Display name
37 * // Validator (executes Validator by written order.)
38 * 'required' => true, // Required Option(true/false)
39 * 'min' => null, // Minimum value
40 * 'max' => null, // Maximum value
41 * 'regexp' => null, // String by Regexp
42 * 'mbregexp' => null, // Multibype string by Regexp
43 * 'mbregexp_encoding' => 'UTF-8', // Matching encoding when using mbregexp
46 * 'filter' => 'sample', // Optional Input filter to convert input
47 * 'custom' => null, // Optional method name which
48 * // is defined in this(parent) class.
54 * Form input value convert filter : sample
57 * @param mixed $value Form Input Value
58 * @return mixed Converted result.
61 function _filter_sample($value)
63 // convert to upper case.
64 return strtoupper($value);
70 * Index action implementation.
74 * @package {$project_id}
76 class {$project_id}_Action_Index extends {$project_id}_ActionClass
79 * preprocess Index action.
82 * @return string Forward name (null if no errors.)
87 if ($this->af->validate() > 0) {
90 $sample = $this->af->get('sample');
96 * Index action implementation.
99 * @return string Forward Name.