Example #1
0
 function fillAttributes()
 {
     parent::fillAttributes();
     if (isset($this->attributes['multiple'])) {
         $this->setAttribute('name', $this->name . '[]');
     }
 }
Example #2
0
 function fillAttributes()
 {
     parent::fillAttributes();
     $this->setAttribute('type', 'checkbox');
     if ($this->getEffectiveValue()) {
         $this->setAttribute('checked', 'checked');
     }
 }
Example #3
0
 function getFormInitCode()
 {
     $code = parent::getFormInitCode();
     foreach ($this->validationRegexes as $regex) {
         if ($regex['useInJs']) {
             $code .= "\ndf.getField('" . $this->name . "').addValidationRegex(" . $regex['regex'] . ", '" . $regex['errorCode'] . "');";
         }
     }
     return $code;
 }
Example #4
0
 function fillAttributes()
 {
     parent::fillAttributes();
     $this->setAttribute('type', 'file');
 }