Example #1
0
 protected function LoadField($type, $number)
 {
     $name = $type . (string) $number;
     if (!parent::LoadField($type, $name)) {
         return false;
     }
     $this->Fields[$name]['Value'] = htmlspecialchars(JRequest::getVar($this->Fields[$name]['PostName'], NULL, 'POST'));
     if ($this->Fields[$name]['Value'] == $this->Fields[$name]['Name']) {
         $this->Fields[$name]['Value'] = "";
     }
     $this->Fields[$name]['IsValid'] = intval($this->ValidateField($this->Fields[$name]['Value'], $this->Fields[$name]['Display']));
     if ($type == "checkbox" && $this->Fields[$name]['Value'] == "") {
         $this->Fields[$name]['Value'] = JText::_('JNO');
     }
     return true;
 }