/
file_settings.html
124 lines (112 loc) · 5.27 KB
/
file_settings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
layout: default
navPage: docs
heading: File Upload Field
breadcrumbs:
- Modules,/modules/
- File Upload Field,/modules/field_type_file/
- File Settings
prev: Default file settings,/modules/field_type_file/default_file_settings/
next: Uploaded filenames,/modules/field_type_file/filenames/
categories: modules
tags: field_types,files
---
{% include open_section.html nav='nav_file_upload.html' selected='file_settings' %}
<h3>Per-field file settings</h3>
{% include screenshot.html item="file_field_settings.png" %}
<p>
Using the file field is very simple: you just choose the "File" field type for any
field on the Edit Form -> Fields tab, and the field will show up as a file upload field
within the Form Tools interface. It will use the file upload field defined in the
Settings -> Files tab.
</p>
<p>
However, you may find it useful to change the default file upload folder, or other
settings. To do that, click the Edit icon on the Edit Form -> Fields tab to open up the
Edit Field dialog window. There, click on the second tab. That contains all the custom
settings, as illustrated in the screenshot to the right. Here's what all the settings
mean.
</p>
<table cellspacing="1" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="blue" width="220" valign="top">Open Link with Fancybox</td>
<td>
"Fancybox" is a script used to open up (usually) images in a dialog window when
clicking on their link in the Form Tools interface. Fancybox
was added in 2.1.0 to replace the earlier "Lightbox" script. Generally you'll
only want to enable this for file upload fields that store an image.
</td>
</tr>
<tr>
<td class="blue" valign="top">Allow multiple file uploads</td>
<td>
This controls whether you users upload more than one file in this field. By default, it's
set to "no" so you need to manually change it to "yes" to enable this functionality. Note: for internal and
Form Builder forms, they will automatically show the new option - no additional configuration is required.
But for external forms (including API forms) you will need to make some
<a href="{{site.baseurl}}/modules/field_type_file/adding_to_forms/">small adjustments to your
HTML markup</a> to allow this. For a couple more details about multiple file uploads, see the section at
the bottom of the page.
</td>
</tr>
<tr>
<td class="blue" valign="top">Folder Path</td>
<td>
This setting controls the folder to which the files are uploaded. The default
folder is defined in the Settings -> Files page. If you update the folder path
here, you must also update the following Folder URL setting, in order to ensure
the files are linked to properly.
</td>
</tr>
<tr>
<td class="blue" valign="top">Folder URL</td>
<td>
This setting specifies the URL of the file upload folder for the field. The default
folder is defined in the Settings -> Files page. As with the previous field: you
need to update the Folder Path field if you ever want to change the Folder URL.
</td>
</tr>
<tr>
<td class="blue" valign="top">Permitted File Types</td>
<td>
This overrides the default permitted file types that may be uploaded through
the field. The default file types are specified on the Settings -> Files page.
</td>
</tr>
<tr>
<td class="blue" valign="top">Max File Sizes (KB)</td>
<td>
This overrides the default max file size that can be uploaded through
the field. The default max file size is specified on the Settings -> Files page.
</td>
</tr>
<tr>
<td class="blue" valign="top">Field Comments</td>
<td>
All field types provide this optional setting: it lets you add some arbitrary text that
appear underneath the field when the user is editing it. This can provide a little information
to the Form Tools user who sees the field.
</td>
</tr>
</tbody>
</table>
<hr size="1" />
<h3>Multiple file upload details</h3>
<p>
There are a couple minor things you should know about when configuring a field for multiple file uploads:
</p>
<ul>
<li>
Uploading multiple files in a single form field is supported by all modern browsers, including IE11 and up. If,
however, a user is using a very old browser which doesn't permit it, internal and Form Builder forms will automatically
downgrade so they can only upload a single one at at time. For any internal form and a Form Builder form with
at least 2 pages before the "thankyou" page, the user can upload multiple files - but only one by one.
</li>
<li>
If you configure your field to allow multiple file uploads then later downgrade it to permit only a <i>single</i>
one, the script will <b>not</b> remove all the files already uploaded in that field. It will continue to allow
users to delete files, but only ever add a new one if there is nothing already in the field.
</li>
</ul>
{% include close_section.html %}