.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../../Includes.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`_ string `authMode\_enforce`_ string `autoSizeMax`_ integer `default`_ string `disableNoMatchingValueElement`_ boolean `dontRemapTablesOnCopy`_ string `enableMultiSelectFilterTextfield`_ boolean `exclusiveKeys`_ string `localizeReferencesAtParentLocalization`_ boolean `items`_ array `itemsProcFunc`_ string `iconsInOptionTags`_ boolean `fileFolder`_ string `fileFolder\_extList`_ string `fileFolder\_recursions`_ string `foreign\_table`_ string `foreign\_table\_where`_ string `foreign\_table\_prefix`_ string `foreign\_table\_loadIcons`_ boolean `itemListStyle`_ string `maxitems`_ integer `minitems`_ integer `MM`_ string `MM\_hasUidField`_ boolean `MM\_insert\_fields`_ array `MM\_match\_fields`_ array `MM\_opposite\_field`_ string `MM\_oppositeUsage`_ array `MM\_table\_where`_ string `multiple`_ boolean `multiSelectFilterItems`_ array `neg\_foreign\_table`_ string `noIconsBelowSelect`_ boolean `renderMode`_ string `rootLevel`_ boolean `selectedListStyle`_ string `selicon\_cols`_ integer `size`_ integer `special`_ string `suppress\_icons`_ 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 :code:`--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/`. For custom icons use a path prepended with "EXT:" to refer to an image file found inside an extension. - Fourth value is an optional description text. This is only shown when the list is shown by renderMode "checkbox". - Fifth value is reserved as keyword "EXPL\_ALLOW" or "EXPL\_DENY". See option "authMode" / "individual" for more details. **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, 'selicons/k1.gif'), array('LLL:EXT:cms/locallang_ttc.php:k2', 1, 'selicons/k2.gif'), array('LLL:EXT:cms/locallang_ttc.php:k3', 2, 'selicons/k3.gif'), ) 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-suppress-icons: suppress\_icons ~~~~~~~~~~~~~~~ .. container:: table-row Key suppress\_icons Datatype string Description Lets you disable display of icons. Can be nice to do if icons are coming from foreign database records and you don't want them. Set it to :code:`IF_VALUE_FALSE` if you *only* want to see icons when a value (non-blank, non-zero) is selected. Otherwise no icons are shown. Set it to :code:`ONLY_SELECTED` if you *only* want to see an icon for the selected item. Set to :code:`1` (true) if you never want any icons. Scope Display .. _columns-select-properties-iconsinoptiontags: iconsInOptionTags ~~~~~~~~~~~~~~~~~ .. container:: table-row Key iconsInOptionTags Datatype boolean Description If set, icons will appear in the :code:`