private function getFormIntroduce() { $form = new Form('introduce_form', $this->router->getUrlByRoute('introduce', array(), false)); $form->addField(new Fields\FieldText('login', 'Имя пользователя', array('style' => 'float: left; width: 300px;'))); $form->addField(new Fields\FieldPassword('password', 'Пароль', array('style' => 'float: left; width: 300px;'))); $form->addField(new Fields\FieldSubmit('submit', '', array('style' => 'float: right;'), 'Войти')); return $form; }
protected function execute(InputInterface $input, OutputInterface $output) { include_once SITE_PATH . DS . 'bootstup.php'; $email = new FieldText('ine', 'ine', array(), '*****@*****.**'); $email->addRule(new IsEmail()); $form = new Form('', ''); $form->addField($email); $form->isValid(); }
public function formFieldErrors(Form $form, $key) { return $form->getRender()->rendFieldErrors($key); }
public function getTaskReportForm($action) { $form = new Form('task_report_form', $action, 'post', array('enctype' => 'multipart/form-data')); $form->addField((new FieldTextArea('body', '', array('style' => 'width: 100%; height: 300px;')))->addRule(new NotEmpty()))->addField(new FieldSubmit('submit', '', array('style' => 'display: none;'), 'Сохранить')); return $form; }