.. include:: /Includes.rst.txt .. _columns-select: TYPE: "select" ^^^^^^^^^^^^^^ Selectors boxes are very common elements in forms. By the "select" type you can create selector boxes. In the most simple form this is a list of values among which you can chose only one. In that way it is similar to the "radio" type above. .. figure:: ../../../Images/TypeSelectLogin.png :alt: A simple selector box A simple selector box with a few options More complex configurations are possible, see the :ref:`examples section ` for more details. .. only:: html .. contents:: :local: :depth: 1 .. _columns-select-properties: Properties """""""""" .. container:: ts-properties ========================================= ========= Property Data Type ========================================= ========= `allowNonIdValues`_ boolean `authMode\_enforce`_ string `authMode`_ string `autoSizeMax`_ integer `default`_ string `disableNoMatchingValueElement`_ boolean `dontRemapTablesOnCopy`_ string `enableMultiSelectFilterTextfield`_ boolean `exclusiveKeys`_ string `fileFolder\_extList`_ string `fileFolder\_recursions`_ string `fileFolder`_ string `foreign\_table\_prefix`_ string `foreign\_table\_where`_ string `foreign\_table`_ string `itemListStyle`_ string `items`_ array `itemsProcFunc`_ string `localizeReferencesAtParentLocalization`_ boolean `maxitems`_ integer `minitems`_ integer `MM\_hasUidField`_ boolean `MM\_insert\_fields`_ array `MM\_match\_fields`_ array `MM\_opposite\_field`_ string `MM\_oppositeUsage`_ array `MM\_table\_where`_ string `MM`_ string `multiple`_ boolean `multiSelectFilterItems`_ array `renderType`_ string `rootLevel`_ boolean `selectedListStyle`_ string `selicon\_cols`_ integer `showIconTable`_ boolean `size`_ integer `special`_ string `treeConfig`_ array `type`_ string `wizards`_ array ========================================= ========= Property details """""""""""""""" .. only:: html .. contents:: :local: :depth: 1 .. _columns-select-properties-type: type ~~~~ .. container:: table-row Key type Datatype string Description *[Must be set to "select"]* Scope Display / Proc. .. _columns-select-properties-items: items ~~~~~ .. container:: table-row Key items Datatype array Description Contains the elements for the selector box unless the property "foreign\_table" or "special" has been set in which case automated values are set in addition to any values listed in this array. Each element in this array is in itself an array where: - First value is the **item label** (string or LLL reference) - Second value is the **value of the item** . - The special value `--div--` is used to insert a non-selectable value that appears as a divider label in the selector box (only for maxitems <=1) - Values must not contain "," (comma) and "\|" (vertical bar). If you want to use "authMode" you should also refrain from using ":" (colon). - Third value is an optional icon. Default path is :file:`typo3/sysext/t3skin/icons/gfx/` but is deprecated since TYPO3 CMS 7, and will be removed with TYPO3 CMS 8. For custom icons use a path prepended with "EXT:" to refer to an image file found inside an extension or use an registered icon identifier. - Fourth value is an optional description text. This is only shown when the list is shown by `renderType`_ `selectCheckBox`. - Fifth value is reserved as keyword "EXPL\_ALLOW" or "EXPL\_DENY". See option "authMode" / "individual" for more details. .. note:: Usage of path in the third property is deprecated. For custom icons use a path prepended with "EXT:" to refer to an image file found inside an extension or use an registered icon identifier, which is the prefered way. **Example:** A configuration could look like this:: 'type' => 'select', 'items' => array( array('English', ''), array('Danish', 'dk'), array('German', 'de'), ) A more complex example could be this (includes icons):: 'type' => 'select', 'items' => array( array('LLL:EXT:cms/locallang_ttc.php:k1', 0, 'EXT:myext/Resources/Public/selicons/k1.gif'), array('LLL:EXT:cms/locallang_ttc.php:k2', 1, 'tx-myext-selicons-k2'), array('LLL:EXT:cms/locallang_ttc.php:k3', 2, 'tx-myext-selicons-k3'), ) Scope Display .. _columns-select-properties-itemsprocfunc: itemsProcFunc ~~~~~~~~~~~~~ .. container:: table-row Key itemsProcFunc Datatype string (function reference) Description PHP function which is called to fill / manipulate the array with elements. The function/method will have an array of parameters passed to it (where the item-array is passed by reference in the key 'items'). By modifying the array of items, you alter the list of items. Since TYPO3 CMS 6.2, your function/method may throw an exception which will be displayed as a proper error message. For more information, see how user-functions are specified in the section about :ref:`wizards ` some pages below here. Scope Display .. _columns-select-properties-selicon-cols: selicon\_cols ~~~~~~~~~~~~~ .. container:: table-row Key selicon\_cols Datatype integer (>0) Description The number of rows in which to position the icons for the selector box. Default is to render as many columns as icons. Scope Display .. _columns-select-properties-showIconTable: showIconTable ~~~~~~~~~~~~~ .. container:: table-row Key showIconTable Datatype boolean Description Controls the rendering of the icons after the select even when icons for the `