.. include:: /Includes.rst.txt .. _columns-user: ============= type = 'user' ============= .. contents:: Table of contents: :local: :depth: 1 .. _columns-user-introduction: Introduction ============ There are three columns config types that do similar things but still have subtle differences between them. These are the :ref:`none type `, the :ref:`passthrough type ` and the :ref:`user type `. Characteristics of `user`: * A value sent to the DataHandler is just kept as is and put into the database field. Default FormEngine however never sends values. * Unlike none, type user must have a database field. * FormEngine only renders a dummy element for type user fields by default. It should be combined with a custom renderType. * Type user field values are rendered as-is at other places in the backend. They for instance can be selected to be displayed in the list module "singel table view". * Field updates by the DataHandler get logged and the history/undo function will work with such values. The `user` field can be useful, if: * A special rendering and evaluation is needed for a value when editing records via FormEngine. .. deprecated:: 9.5 The property :php:`userFunc` of :php:`type='user'` has been deprecated with TYPO3 9.5 and removed with TYPO3 10. Override the node in the FormEngine Rendering instead. See example below. .. _columns-user-examples: Examples ======== The example registers an own node element a TCA field using it and a class implementing a rendering. See :ref:`FormEngine docs` for more details on this. Register an own node element:: // Register a node in ext_localconf.php $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][] = [ 'nodeName' => 'lollisCustomMapElement', 'priority' => 40, 'class' => \Vendor\Extension\Form\Element\LollisCustomMapElement::class, ]; Use it as renderType in TCA:: 'myMapElement' => [ 'label' => 'My map element', 'config' => [ 'type' => 'user', 'renderType' => 'lollisCustomMapElement', 'parameters' => [ 'useOpenStreetMap' => true, ], ], ], Add a class implementation:: data, for example the above // parameters are available in $this->data['parameterArray']['fieldConf']['config']['parameters'] $result = $this->initializeResultArray(); $result['html'] = 'my map content'; return $result; } } .. _columns-user-properties-type: .. _columns-user-properties-notablewrapping: .. _columns-user-properties-parameters: .. _columns-user-properties-userfunc: .. _columns-user-properties: Properties renderType default ============================= The default renderType just renders a dummy entry to indicate a custom renderType should be added.