Пример #1
0
 function fillAttributes()
 {
     parent::fillAttributes();
     if (isset($this->attributes['multiple'])) {
         $this->setAttribute('name', $this->name . '[]');
     }
 }
Пример #2
0
 function fillAttributes()
 {
     parent::fillAttributes();
     $this->setAttribute('type', 'checkbox');
     if ($this->getEffectiveValue()) {
         $this->setAttribute('checked', 'checked');
     }
 }
Пример #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;
 }
Пример #4
0
 function fillAttributes()
 {
     parent::fillAttributes();
     $this->setAttribute('type', 'file');
 }