Documentation · ViewHelper reference

Field / NoneViewHelper

None field ViewHelper

Makes a read-only component which supports a default value but which cannot be edited. /

  • Tag usage example

    <flux:field.none name="NULL" label="NULL" default="NULL" required="1" exclude="1" transform="NULL" enabled="1" requestUpdate="1" displayCond="NULL" inherit="1" inheritEmpty="1" clear="1" variables="{foo: 'bar'}" extensionName="NULL">
    	<!-- tag content - may be ignored! -->
    </flux:field.none>
  • Inline usage example

    {flux:field.none(name: 'NULL', label: 'NULL', default: 'NULL', required: 1, exclude: 1, transform: 'NULL', enabled: 1, requestUpdate: 1, displayCond: 'NULL', inherit: 1, inheritEmpty: 1, clear: 1, variables: {foo: 'bar'}, extensionName: 'NULL')}

Arguments

Argument Description Type
clear

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

boolean
default

Default value for this attribute

string
displayCond

Optional "Display Condition" (TCA style) for this particular field. See: https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Index.html#displaycond

string
enabled

If FALSE, disables the field in the FlexForm

boolean
exclude

If TRUE, this field becomes an "exclude field" (see TYPO3 documentation about this)

boolean
extensionName

If provided, enables overriding the extension context for this and all child nodes. The extension name is otherwise automatically detected from rendering context.

string
inherit

If TRUE, the value for this particular field is inherited - if inheritance is enabled by the ConfigurationProvider

boolean
inheritEmpty

If TRUE, allows empty values (specifically excluding the number zero!) to be inherited - if inheritance is enabled by the ConfigurationProvider

boolean
label

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.

string
name

Name of the attribute, FlexForm XML-valid tag name string

string
requestUpdate

If TRUE, the form is force-saved and reloaded when field value changes

boolean
required

If TRUE, this attribute must be filled when editing the FCE

boolean
transform

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.

string
variables

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

array
Required attribute

Revision history

commit 5c068a0b51d8df1b3881797c872f2b9394ab7522
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Dec 22 00:24:24 2013 +0100

    [FEATURE] Identity and None components and ViewHelpers
    
    Can be used to generate read-only fields; the Identity component
    generates a `None` field that can only have one name: `id`.

commit 8bf2b5beb89c7d72a41230f152d9a5a3d308ba84
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:11:00 2013 +0100

    [TASK] Happy new year!

commit f81695c83b2500dba90ce8712e4ed027a3c352de
Author: G. Bodenschatz <*****@46halbe.de>
Date:   Wed Sep 17 00:49:45 2014 +0200

    [TASK] Use correct return type in annotation