diff --git a/code/model/editableformfields/EditableFileField.php b/code/model/editableformfields/EditableFileField.php index 84695ad..5b23cb2 100755 --- a/code/model/editableformfields/EditableFileField.php +++ b/code/model/editableformfields/EditableFileField.php @@ -49,9 +49,14 @@ class EditableFileField extends EditableFormField { } public function getFormField() { - $field = FileField::create($this->Name, $this->EscapedTitle) - ->setFieldHolderTemplate('UserFormsField_holder') - ->setTemplate('UserFormsFileField'); + if(isset(Config::inst()->get('EditableFileField', 'use_uploadfield')) && Config::inst()->get('EditableFileField', 'use_uploadfield')) { + $field = Upload::create($this->Name, $this->EscapedTitle) + } else { + $field = FileField::create($this->Name, $this->EscapedTitle) + } + + $field->setFieldHolderTemplate('UserFormsField_holder') + ->setTemplate('UserFormsFileField'); $field->getValidator()->setAllowedExtensions( array_diff(