Example #1
0
 public function init()
 {
     parent::init();
     // initialize form
     $this->setName('editReceivableForm')->setAction('/projects/receivable/edit')->setMethod('post');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addValidator('Int')->addFilter('StringTrim');
     $this->addElement($id);
 }
Example #2
0
 private function setDateValueToFormField(C3op_Form_ReceivableCreate $form, $fieldName, $value)
 {
     $field = $form->getElement($fieldName);
     if ($value != '0000-00-00' && $value != "") {
         $field->setValue($this->formatDataToShow($value));
     } else {
         $field->setValue("");
     }
 }