1 <?php
2
3 /**
4 * Allows a user to add a field that can be used to upload a file.
5 *
6 * @package userforms
7 */
8
9 class EditableFileField extends EditableFormField {
10
11 static $singular_name = 'File Upload Field';
12 static $plural_names = 'File Fields';
13
14 public function getFieldConfiguration() {
15 $options = parent::getFieldConfiguration();
16 $options->removeByName("Fields[$this->ID][CustomSettings][Placeholder]");
17 return $options;
18 }
19
20 public function getFormField() {
21 $field = new FileField($this->Name, $this->Title);
22
23 return $field;
24 }
25
26
27 public function getSubmittedFormField() {
28 return new SubmittedFileField();
29 }
30 }