Documentation · ViewHelper reference

XSD schema file | vhs master

Form / Select / OptionViewHelper

Option ViewHelper to use under vhs:form.select. /

  • Tag usage example

    <v:form.select.option additionalAttributes="{foo: 'bar'}" data="{foo: 'bar'}" name="NULL" value="[mixed]" property="NULL" class="NULL" dir="NULL" id="NULL" lang="NULL" style="NULL" title="NULL" accesskey="NULL" tabindex="123" onclick="NULL" selected="1">
    	<!-- tag content - may be ignored! -->
    </v:form.select.option>
  • Inline usage example

    {v:form.select.option(additionalAttributes: {foo: 'bar'}, data: {foo: 'bar'}, name: 'NULL', value: [mixed], property: 'NULL', class: 'NULL', dir: 'NULL', id: 'NULL', lang: 'NULL', style: 'NULL', title: 'NULL', accesskey: 'NULL', tabindex: 123, onclick: 'NULL', selected: 1)}

Arguments

Argument Description Type
accesskey

Keyboard shortcut to access this element

string
additionalAttributes

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

array
class

CSS class(es) for this element

string
data

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

array
dir

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

string
id

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

string
lang

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

string
name

Name of input tag

string
onclick

JavaScript evaluated for the onclick event

string
property

Name of Object Property. If used in conjunction with , "name" and "value" properties will be ignored.

string
selected

Set to TRUE to mark field as selected; otherwise detected from field value

boolean
style

Individual CSS styles for this element

string
tabindex

Specifies the tab order of this element

integer
title

Tooltip text of element

string
value

Value of input tag

mixed
Required attribute

Revision history

commit ea3893cd4d93538f6aba597d529b03ef9f1a0222
Author: Claus Due <*****@wildside.dk>
Date:   Fri Nov 2 16:37:10 2012 +0100

    [FEATURE] Form / Select, Option and Optgroup ViewHelpers

commit eeaa38c08088ab9126ede7e5b95f3542c8a12c74
Author: Stefano Cecere <*****@krur.com>
Date:   Mon Nov 19 19:07:19 2012 +0100

    [BUGFIX] OptionViewHelper and multiple preselection http://forge.typo3.org/issues/42329

commit ed151c4888a3729e899c6b34194113a2e62a4ab3
Author: Tobias Pinnekamp <*****@eshaker.de>
Date:   Fri Dec 7 15:28:40 2012 +0100

    Use isset() to make 0 or empty string possible as values

commit aa32ca2050a4ac2d8ff0a2183b316c7c0f2477ed
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Sun May 26 16:00:15 2013 +0200

    [TASK] A*****@throws annotations

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file