38 require_once realpath(dirname(__FILE__)).
"/../field_renderers.inc";
61 if ($form->data->hasField(
$field))
63 $form->override(
$field, $label, $this);
68 $form->overrides[
$field][
'label'] = $label;
78 $accept = $this->accept ?
" accept='{$this->accept}'" :
"";
79 echo
"<input id='{$this->parent->id}_{$field}' type='file' name='$field' value='".$this->parent->data->get(
$field).
"' size='{$this->size}'{$accept}>";
87 echo $this->parent->data->get(
$field);
94 call_user_func($this->handler,
$field, $this->parent->data);
FieldRenderer is the abstract base class for all FieldRenderers.
_startField($field, $styles="")
Internal method to generate the starting HTML for the field (including the label)
_endField($field)
Internal method to generate the closing HTML for the field.
FieldRenderer($parent)
Constructor.
Field renderer for file upload data fields.
renderField($field)
FieldRenderers must override this method to provide the HTML implementation of the control used to ed...
preProcess($field="")
FieldRenderers can override this method to provide behavior that occurs prior to the saving of the pa...
FileUploadFieldRenderer(&$form, $field, $label, $handler)