php class Post_Form_Core extends Formation public function __construct

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<?php
class Post_Form_Core extends Formation{
public function __construct()
{
parent::__construct();
$this->legend='Add post';
$this->add_element('input','title')->add_rule('required')->add_pre_filter('ucfirst');
$this->add_element('textarea','text')->add_rule('required');
$this->add_element('submit','Submit');
}
}