ViewHelper Documentation


A view helper which generates an HTML element. Make sure to set enctype="multipart/form-data" on the form!

If a file has been uploaded successfully and the form is re-displayed due to validation errors, this ViewHelper will render hidden fields that contain the previously generated resource so you won't have to upload the file again.

You can use a separate ViewHelper to display previously uploaded resources in order to remove/replace them.

= Examples =

<f:form.upload name="file" />

<f:form.upload property="attachments.0.originalResource" /> <f:form.upload property="attachments.1.originalResource" />

<f:form.upload name="file" value="{someDefaultResource}" />

<f:form.upload name="file" collection="invoices"/>


additionalAttributes anySimpleType

Additional tag attributes. They will be added directly to the resulting HTML tag.

data anySimpleType

Additional data-* attributes. They will each be added with a "data-" prefix.

name string

Name of input tag

value anySimpleType

Value of input tag

property string

Name of Object Property. If used in conjunction with <f:form object="...">, "name" and "value" properties will be ignored.

disabled boolean

Specifies that the input element should be disabled when the page loads

errorClass string

CSS class to set if there are errors for this view helper

collection string

Name of the resource collection this file should be uploaded to

class string

CSS class(es) for this element

dir string

Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)

id string

Unique (in this file) identifier for this HTML element.

lang string

Language for this element. Use short names specified in RFC 1766

style string

Individual CSS styles for this element

title string

Tooltip text of element

accesskey string

Keyboard shortcut to access this element

tabindex integer

Specifies the tab order of this element

onclick string

JavaScript evaluated for the onclick event

ViewHelper Resources

Schema Resources