addElement('text', 'title', array('label' => 'Title', 'required' => true, 'maxLength' => 150)); $this->getElement('title')->addFilter('StringTrim'); $this->addElement( 'pageAlias', 'alias', array( 'label' => 'Alias', 'required' => true, 'maxlength' => 200, 'sourceField' => 'title', 'aliasValidatorOptions' => array( 'table' => new \Qs_Db_Table('PostCategory'), 'column' => 'alias', 'currentId' => $this->_getData('id') ) ) ); $this->addElement('checkbox', 'enabled', array('label' => 'Show on user end', 'decoration' => 'simple')); return $this; } }