Example #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);
 }
 private function _ShortDescription()
 {
     $element = new \Phalcon\Forms\Element\Textarea("ShortDescription");
     $element->setLabel("ShortDescription");
     return $element;
 }