forms:fileupload
AJAX
ajax:delayedload ajax:event ajax:navigation ajax:region
Data
data:calendar data:column data:eventrepeater data:postrepeater data:productbrandrepeater data:productcategoryrepeater data:productrepeater data:repeater data:table data:template data:tree
Forms
forms:address forms:captcha forms:checkbox forms:checkboxgroup forms:codeeditor forms:combobox forms:datepicker forms:dialogbox forms:editbox forms:fileupload
ATTRIBUTES
EXAMPLES
forms:form forms:hidden forms:money forms:officeuseregion forms:option forms:password forms:paymentmethod forms:radiobutton forms:radiobuttongroup forms:row forms:searchbox forms:signature forms:slider forms:spinbox forms:submitbutton forms:submitimage forms:submitlink forms:successcontent forms:textarea forms:timepicker
Layout
layout:gallery layout:productgallery layout:rotator layout:stepper layout:stepperpanel layout:tablist layout:tablistitem
Logic
logic:dependency logic:else logic:if logic:include logic:parse logic:variable
Navigation
navigation:breadcrumbs navigation:item navigation:primary navigation:secondary
Personalisation
personalisation:firstname personalisation:fullname personalisation:lastname personalisation:other
Standard
standard:audio standard:embed standard:icon standard:image standard:link standard:script standard:tooltip standard:video
Templates
templates:button templates:card templates:column templates:fancybox templates:faq templates:flexlayout templates:header templates:row templates:section templates:styles templates:teammember templates:testimonial
Regions
regions:content regions:contentadditional regions:security regions:togglable
Third Party
thirdparty:googlemap thirdparty:googlemapmarker

<forms:fileupload />

Allows the user to upload a file.

Attributes

autoFocus
bool
Auto Focus

If true, this control will attempt to focus itself after the page has loaded. Note that only one element may be focused on the page at a time.
Default = false
buttonIcon
string
The name or path for an icon to be used on the upload button.
Supported names are "Upload", "Attachment", "Photo". Any other value will be interpreted as a path.
buttonText
string
The text to display inside the browse button. This text is rendered as HTML and may contain tags or HTML entities.
dataColumn
Sets the data column

The datacolumn links the form item to a key used when getting or saving from a component (as defined by the parent form).
disabled
bool
Disable Input

Disables the input, preventing user interaction
extensions
string
Extensions

Defines a whitelist for acceptable file extensions. This can be a keyword reference to one of the standard provided lists, or as a list of '.' prefixed extensions in lower case.

Whitespaces are ignored in all cases.

Extension Whitelist Keywords:
MEDIA
.txt .pdf .rtf .odt .wpd .sxw .sxi .odp .xml .doc .docx .ppt .pptx .pps .ppsx .xls .xlsx .csv .gif .jpg .jpeg .bmp .png .webp .svg .tif .tiff .flv .mp4 .avi .webm .mpeg .mpeg4 .mpg .mpegs .mov .wmv .3gpp .wav .mp3 .wma .au .ogg
DOC
.txt .pdf .rtf .odt .wpd .sxw .sxi .odp .xml .doc .docx .ppt .pptx .pps .ppsx .xls .xlsx .csv
IMAGE
.gif .jpg .jpeg .png .webp .svg
VIDEO
.flv .mp4 .avi .webm .mpeg .mpeg4 .mpg .mpegs .mov .wmv .3gpp
AUDIO
.wav .mp3 .wma .au .ogg
ALL
No extension whitelist will be applied.

Non-Keyword Attribute Examples:
extensions="" (empty string)
No extensions will match this list. Use "ALL" if no whitelist is desired.
extensions="." (dot)
Only files ending in no extension.
extensions=".csv.zip"
Only files ending in or '.csv', or '.zip'.
extensions=".csv.zip."
Only files ending in no extension, '.csv', or '.zip'.
fileCountLimit
string
The maximum number of files allowed to be uploaded.
Set this option to "none" for no limit. This is the default.
fileSizeLimit
string
The maximum individual file size allowed.

If a number by itself is supplied, the value will be in bytes.
A number followed by either KB, MB, or GB can be specified to specify the unit.
Set this option to "none" for no limit. This is the default.
height
string
Height

Sets the height of the element. The default units are pixels. include the percentage symbol % to user percentage values.
id
string
(Required) Most form items need a unique id so that they can submit data to the server. No two form items may have the same id. For situations where multiple form items submit to the same field, see the name attribute. Id's that begin with contact_ will automatically save Contact information to the Contact database as long as the user has entered enough identifying information (ideally Name and Email). Check the Contact Fields page for correct field names.
multipleUpload
boolean
Enables multiple upload. Defaults false.
name
string
Sets the name of the form item. Most of the time, the id attribute will suffice. However, with form items that post multiple values into an array, each item will need to have the same name, followed by []. For example three controls with name="data[]", will all post into 'data'.
Radio buttons belonging to the same group will have to share the same name.
onQueueComplete
string
A JavaScript callback triggered when all uploads have completed. _arrFileUploadSuccessFiles: {Array{ complete: {Boolean}, name: string, arrFileNames: {Array{String}}, // The file names as they have been stored in the // filesystem. type: string, size: int, uploading: {Boolean} }}
saveState
bool
Restore state on reload

Whether the value of the input persists when the page is revisited.
Default = false
tinyMode
bool
If set to true, a simple input type="file" will be used.
totalSizeLimit
string
The maximum individual file size allowed.

If a number by itself is supplied, the value will be in bytes.
A number followed by either KB, MB, or GB can be specified to specify the unit.
Set this option to "none" for no limit. This is the default.
transformations
Value Transformations

Sets the value transformations to be applied to the value of the form item as a comma separated string.
validations
Validations

Sets the validations to be applied to the value of the form item as a comma separated string.

Eg: validations="mandatory"
width
string
Width

Sets the width of the element. The default units are pixels. include the percentage symbol % to user percentage values.

Examples

Simple File Upload Example

Describes how to put a file upload element into a form

HTML:

<forms:form> <forms:row label="Upload a File"> <forms:fileupload id="upload_file" /> </forms:row> </forms:form>

Upload an image to email example

Uses form's onsubmitemail and fileupload's extensions="IMAGE"

HTML:

<forms:form id="support_request" onsubmitemail="suport@yourcompany.com" onsubmitemailsubject="[? 'Support Request: ' + $_POST['subject'] ?]" contactmode="store" onsubmitredirect="/company/contact-us/success/" recordsubmissions="true"> <forms:row label="First Name"> <forms:editbox id="contact_first_name" width="100%" validations="mandatory" /> </forms:row> <forms:row label="Last Name"> <forms:editbox id="contact_last_name" width="100%" validations="mandatory" /> </forms:row> <forms:row label="Email Address"> <forms:editbox id="contact_email" width="100%" validations="mandatory" /> </forms:row> <forms:row label="Contact Phone"> <forms:editbox id="contact_phone" width="100%" /><br /> </forms:row> <forms:row label="Support Subject" > <forms:editbox id="subject" width="100%" validations="mandatory" /><br /> </forms:row> <forms:row label="Issue details:" description="Please explain the issue you are having, providing as much detail as possible."> <forms:textarea id="details" width="100%" height="150" validations="mandatory" /> </forms:row> <forms:row label="Upload a Screenshot"> <forms:fileupload extensions="IMAGE" id="screenshot" /> </forms:row> <forms:row> <forms:submitbutton>Submit</forms:submitbutton> </forms:row> </forms:form>