diff --git a/typo3/sysext/form/Documentation/Config/proto/formElements/Index.rst b/typo3/sysext/form/Documentation/Config/proto/formElements/Index.rst index 1bff152e5f0f3a031bd210cb253d3d0105b17012..10f9d985e722f276729ccf395cf30ae47d0320c0 100644 --- a/typo3/sysext/form/Documentation/Config/proto/formElements/Index.rst +++ b/typo3/sysext/form/Documentation/Config/proto/formElements/Index.rst @@ -127,6 +127,32 @@ Common <formElementTypeIdentifier> properties ============================================= +.. _typo3.cms.form.prototypes.<prototypeIdentifier>.formelementsdefinition.<formelementtypeidentifier>.defaultValue: + +defaultValue +------------ + +:aspect:`Option path` + TYPO3.CMS.Form.prototypes.<prototypeIdentifier>.formElementsDefinition.<formElementTypeIdentifier>.defaultValue + +:aspect:`Data type` + string/ array + +:aspect:`Needed by` + Frontend/ Backend (form editor) + +:aspect:`Mandatory` + No + +:aspect:`Default value` + undefined + +:aspect:`Description` + If set this string/ array will be used as default value of the form + element. Array is in place for multi value elements (e.g. the + ``MultiSelect`` form element). + + .. _typo3.cms.form.prototypes.<prototypeIdentifier>.formelementsdefinition.<formelementtypeidentifier>.implementationclassname: implementationClassName diff --git a/typo3/sysext/form/Documentation/FAQ/Index.rst b/typo3/sysext/form/Documentation/FAQ/Index.rst index 983f1599a60d611ca7e2d3df73ef50189e814ab6..2d2facbe3253e2eb6499d0c7088a6a28c0b4e092 100644 --- a/typo3/sysext/form/Documentation/FAQ/Index.rst +++ b/typo3/sysext/form/Documentation/FAQ/Index.rst @@ -153,11 +153,33 @@ Currently, there are no plans to implement such a feature. There are huge concerns regarding the data privacy when it comes to storing user data in your TYPO3 database permanently. + .. _faq-honeypt-session: The honeypot does not work with static site caching. What can I do? =================================================================== -If you want to use a static site caching - for example using the staticfilecache extension - -you should disable the automatic inclusion of the -honeypot. Read more ':ref:`here<typo3.cms.form.prototypes.\<prototypeIdentifier>.formelementsdefinition.form.renderingoptions.honeypot.enable>`'. \ No newline at end of file +If you want to use a static site caching - for example using the +staticfilecache extension - you should disable the automatic inclusion of the +honeypot. Read more ':ref:`here<typo3.cms.form.prototypes.\<prototypeIdentifier>.formelementsdefinition.form.renderingoptions.honeypot.enable>`'. + + +.. _faq-form-element-default-value: + +How do I set a default value for my form element? +================================================= + +Most of the form elements support setting a default value (do not mix this +up with the placeholder attribute). For a text field or a textarea, this is +quite trivial. + +A little bit more thrilling is the handling for select and multi select form +elements. Those special elements support - beside the :yaml:`defaultValue` - a +:yaml:`prependOptionValue` setting. The :yaml:`defaultValue` allows you to select a +specific option as default. This option will be pre-selected as soon as the +form is loaded. In contrast, the :yaml:`prependOptionValue` allows you to define a +string which will be shown as the first select-option. If both settings exist, +the :yaml:`defaultValue` is prioritized. + +Learn more ':ref:`here<typo3.cms.form.prototypes.\<prototypeIdentifier>.formelementsdefinition.\<formelementtypeidentifier>.defaultValue>`' +and see the forge issue `#82422 <https://forge.typo3.org/issues/82422#note-6>`. \ No newline at end of file