function fillAttributes() { parent::fillAttributes(); $this->setAttribute('type', 'submit'); $this->setAttribute('value', $this->content); }
function addField(DingesField $field) { if (isset($this->fields[$field->getName()])) { throw new DingesException('There is already a field with the name: ' . $field->getName()); } $this->fields[$field->getName()] = $field; $field->_setForm($this); if ($this->posted) { if ($field instanceof DingesFile) { if (isset($_FILES[$field->getName()])) { $field->_setValue($_FILES[$field->getName()]); } } else { if (isset($_POST[$field->getName()])) { $field->_setValue($_POST[$field->getName()]); } } } }