ViewHelper Documentation
flux:field.file
Group (select supertype) FlexForm field ViewHelper, subtype "file"
Select and render an image
<flux:field.file name="settings.image" allowed="jpg,png,svg" showThumbnails="1" />
Then use <f:image>
to render the image in the frontend:
<f:image src="{settings.image}"/>
alt
and title
tags are not loaded from the file's meta data record.
Use <flux:field.inline.fal>
if you want this feature.
Arguments
- name
- label
- default
- required
- exclude
- transform
- enabled
- requestUpdate
- displayCond
- inherit
- inheritEmpty
- clear
- variables
- extensionName
- validate
- size
- multiple
- minItems
- maxItems
- itemListStyle
- selectedListStyle
- items
- emptyOption
- translateCsvItems
- itemsProcFunc
- maxSize
- allowed
- disallowed
- uploadFolder
- showThumbnails
- useFalRelation
- internalType
name string
Name of the attribute, FlexForm XML-valid tag name string
label string
Label for the attribute, can be LLL: value. Optional - if not specified, Flux tries to detect an LLL label named "flux.fluxFormId.fields.foobar" based on field name, in scope of extension rendering the Flux form. If field is in an object, use "flux.fluxFormId.objects.objectname.foobar" where "foobar" is the name of the field.
default string
Default value for this attribute
required boolean
If TRUE, this attribute must be filled when editing the FCE
exclude boolean
If TRUE, this field becomes an "exclude field" (see TYPO3 documentation about this)
transform string
Set this to transform your value to this type - integer, array (for csv values), float, DateTime, Vendor\MyExt\Domain\Model\Object or ObjectStorage with type hint.
enabled boolean
If FALSE, disables the field in the FlexForm
requestUpdate boolean
If TRUE, the form is force-saved and reloaded when field value changes
displayCond string
Optional "Display Condition" (TCA style) for this particular field. See: https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Index.html#displaycond
inherit boolean
If TRUE, the value for this particular field is inherited - if inheritance is enabled by the ConfigurationProvider
inheritEmpty boolean
If TRUE, allows empty values (specifically excluding the number zero!) to be inherited - if inheritance is enabled by the ConfigurationProvider
clear boolean
If TRUE, a "clear value" checkbox is displayed next to the field which when checked, completely destroys the current field value all the way down to the stored XML value
variables anySimpleType
Freestyle variables which become assigned to the resulting Component - can then be read from that Component outside this Fluid template and in other templates using the Form object from this template
extensionName string
If provided, enables overriding the extension context for this and all child nodes. The extension name is otherwise automatically detected from rendering context.
validate string
FlexForm-type validation configuration for this input
size integer
Size of the selector box
multiple boolean
If TRUE, allows selecting the same value multiple times
minItems integer
Minimum required number of items to be selected
maxItems integer
Maxium allowed number of items to be selected
itemListStyle string
Overrides the default list style when maxItems > 1
selectedListStyle string
Overrides the default selected list style when maxItems > 1 and renderType is SelectSingle
items anySimpleType
Items for the selector; array / CSV / Traversable / Query supported
emptyOption anySimpleType
If not-FALSE, adds one empty option/value pair to the generated selector box and tries to use this property's value (cast to string) as label.
translateCsvItems boolean
If TRUE, attempts to resolve a LLL label for each value provided as CSV in "items" attribute using convention for lookup "$field.option.123" if given "123" as CSV item value. Field name is determined by normal Flux field name conventions
itemsProcFunc string
Function for serving items. See TCA "select" field "itemsProcFunc" attribute
maxSize integer
Maximum file size allowed in KB
allowed string
Defines a list of file types allowed in this field
disallowed string
Defines a list of file types NOT allowed in this field
uploadFolder string
Upload folder to use for copied/directly uploaded files
showThumbnails boolean
If TRUE, displays thumbnails for selected values
useFalRelation boolean
use a fal relation instead of a simple file path
internalType string
Internal type (TCA internal_type) to use for the field. Defaults to `file_reference` but can be set to `file` to support file uploading