/** * @return void */ public function baseInit() { $this->addElement('text', 'dictionary_name', array('required' => true, 'label' => 'Dictionary name:')); $this->addElement('text', 'code', array('required' => true, 'label' => 'Dictionary code:', 'validators' => array(array('Regex', true, array('/[a-z0-9_]{1,50}/'))))); $backendApplications = array(0 => ''); $model = new BackendApplication(); foreach ($model->fetchAll($model->select()->where('ghost = false')->order('application_name ASC')) as $val) { $backendApplications[$val->id] = $val->application_name; } $this->addElement('select', 'id_backend_application', array('label' => 'Backend Application name:', 'multioptions' => $backendApplications)); $this->submit(); $this->cancel(); }