grouplist = $grouplist; } public function init() { $this->setName("PreBootCreate"); $this->setMethod('post'); $this->addElement('text', 'title', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 50)), ), 'required' => true, 'label' => 'Title:', )); $groupfield = $this->createElement('select','groupID'); $groupfield ->setLabel('Group:'); if(count($this->grouplist)>0){ foreach($this->grouplist as $group => $g){ $groupfield->addMultiOption($g->getID(), $g->getTitle()); } } $groupfield->setRegisterInArrayValidator(false); $this->addElement($groupfield); $this->addElement('text', 'path_preboot', array( 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array(0, 240)), ), 'required' => true, 'size' => 50, 'label' => 'Path to Preboot:', )); $this->addElement('submit', 'createpreboot', array( 'required' => false, 'ignore' => true, 'label' => 'Create Preboot', )); $this->addElement('button', 'Cancel', array( 'onclick' => 'self.location="/dev/preboot"' )); } }