Inheritance: extends Form_Field
Example #1
0
 function validate()
 {
     if (!isset($this->value_list[$this->value]) && (!$this->value && $this->empty_value)) {
         $this->displayFieldError("Value " . $this->value . " is not one of offered values");
     }
     return parent::validate();
 }
Example #2
0
 function validateValidItem()
 {
     if ($this->validate_values) {
         return parent::validateValidItem();
     }
     return true;
 }
Example #3
0
 function validate()
 {
     if (!isset($this->value_list[$this->value])) {
         /*
           if($this->api->isAjaxOutput()){
           echo $this->ajax()->displayAlert($this->short_name.":"."This is not one of offered values")->execute();
           }
         */
         $this->displayFieldError("This is not one of offered values");
     }
     return parent::validate();
 }
Example #4
0
 function validate()
 {
     if (!$this->value) {
         return parent::validate();
     }
     $this->getValueList();
     //otherwise not preloaded?
     if (!isset($this->value_list[$this->value])) {
         /*
           if($this->api->isAjaxOutput()){
           $this->ajax()->displayAlert($this->short_name.": This is not one of the offered values")
           ->execute();
           }
         */
         $this->form->errors[$this->short_name] = "This is not one of the offered values";
     }
     return parent::validate();
 }
Example #5
0
 function render()
 {
     $this->js(true)->_load('ui.atk4_reference')->atk4_reference();
     parent::render();
 }
Example #6
0
 function init()
 {
     parent::init();
     $this->disable();
 }