Example #1
0
 public function getForm()
 {
     $this->getCurrentStepFields();
     $frm = new OJForm($this->currentStepFields, $this->formMultiFieldValidations[$this->currentStepName], $this->formRules, $this->fieldGroups, $this->values);
     if ($this->fieldTemplate != null) {
         $frm->setFieldTemplate($this->fieldTemplate);
     }
     return $frm;
 }
Example #2
0
 public function getForm()
 {
     $form = new OJForm($this->name, ($this->isNew() ? 'Add ' : 'Update ') . $this->name);
     if (!$this->isNew()) {
         $form->addField(array('type' => 'hidden', 'name' => $this->idField, 'default' => $this->row[$this->idField]));
     }
     foreach ($this->fields as $field) {
         $detail = array('name' => $field[0]);
         $detail['type'] = $this->mapField($field[1]);
         $detail['default'] = $this->getCol($field[0]);
         $detail['label'] = $field[2] ? $field[2] : ucfirst($field[0]);
         if (preg_match('/required/i', $field[3])) {
             $detail['label'] .= ' *';
         }
         $form->addField($detail, $field[5]);
     }
     return $form;
 }
 /**
  * getSearchForm
  * 
  * @access protected
  *
  * @return mixed Value.
  */
 protected function getSearchForm()
 {
     $retstr = '<form action="" method="get" class="form-horizontal" accept-charset="utf-8"><div class="ccm-pane-options-permanent-search">';
     $frm = new OJForm($this->getSearchFields());
     $frm->setFormTemplate($this->searchFormTemplate);
     $retstr .= $frm->getMarkup();
     $retstr .= '<div class="span2"><input type="submit" class="btn" value="Search"><img height="11" width="43" id="ccm-search-loading" class="ccm-search-loading" src="/concrete/images/loader_intelligent_search.gif"></div>';
     $retstr .= '</div></form>';
     return $retstr;
 }