Ejemplo n.º 1
4
 public function initialize($entity = NULL)
 {
     $title = new \Phalcon\Forms\Element\Text('title');
     $title->setLabel('Title:');
     $title->addValidators(array(new \Phalcon\Validation\Validator\PresenceOf(array('message' => 'Title is required.'))));
     $this->add($title);
     $text = new \Phalcon\Forms\Element\Textarea('text', array('rows' => 12));
     $text->setLabel('Text:');
     $text->addValidators(array(new \Phalcon\Validation\Validator\PresenceOf(array('message' => 'Text is required.'))));
     $this->add($text);
 }
Ejemplo n.º 2
0
 private function _ShortDescription()
 {
     $element = new \Phalcon\Forms\Element\Textarea("ShortDescription");
     $element->setLabel("ShortDescription");
     return $element;
 }