public function test() { $form = new \control\form('test'); $text = new \control\textbox('textbox'); $text->configure('LABEL', 'Name'); $text->configure('ADDON', 'N'); $btn = new \control\button('BTN'); $btn->configure('LABEL', 'Click me!'); $btn->configure('P_ONCLICK_PLUGIN', 'hello'); $btn->configure('P_ONCLICK_FUNCTION', 'btn_onclick'); $form->add_array(array($text, $btn)); return array('TITTLE', $form->draw()); }
protected function view_show($result) { $form = new control\form('login'); $username = new control\textbox(); $username->configure('NAME', 'username'); $username->configure('ADDON', 'U'); $username->configure('LABEL', 'Username:'******'PLACE_HOLDER', 'Username'); $password = new control\textbox(); $password->configure('NAME', 'password'); $password->configure('ADDON', 'P'); $password->configure('STYLE', 'color:red;'); $password->configure('LABEL', 'Passord:'); $password->configure('PLACE_HOLDER', 'Password'); $form->add_array(array($username, $password)); return array('login', $form->draw()); }