.. _predefined-form: =============== Predefined Form =============== Predefine form settings and make them selectable in plugin record. .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **TypoScript Path** - plugin.tx_formhandler_form.settings.predefinedForms.FormName .. code-block:: typoscript Example Code: plugin.tx_formhandler_form.settings.predefinedForms.devExample { formId = DevExampleForm formName = Dev Example Form formValuesPrefix = DevExampleForm langFileDefault = locallang_example_form.xlf templateForm = DevExample/Default templateMailHtml = DevExample/MailHtml templateMailText = DevExample/MailText conditionBlocks { } fileUpload { } debuggers { } steps { 1 { templateForm = DevExampleForm/DevExampleHTMLStep1 validators { DefaultValidator { model = DefaultValidator config { messageLimit = 1 messageLimits { customer.email = 2 } fields { customer.fields { firstname.errorChecks { required { model = Required } lengthMax { model = LengthMax lengthMax = 20 } } lastname.errorChecks { required { model = Required } lengthMax { model = LengthMax lengthMax = 20 } } streetAddress.errorChecks { required { model = Required } } postalCode.errorChecks { required { model = Required } } city.errorChecks { required { model = Required } lengthMax { model = LengthMax lengthMax = 70 } } country.errorChecks { required { model = Required } } telephone.errorChecks { required { model = Required } lengthMax { model = LengthMax lengthMax = 20 } } email.errorChecks { required { model = Required } lengthMax { model = LengthMax lengthMax = 50 } email { model = Email } } } } } } } } } finishers { Mail { model = MailFinisher } Redirect { model = RedirectFinisher config { returns = true correctRedirectUrl = false additionalParams { postal_code = 1.customer.postalCode queryParam2 = valueIfNotFoundAsFieldName } } } } } **Properties** .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **formId** - Value of the id attribute of the form tag. * - - * - *Mandatory* - True * - *Data Type* - String .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **formName** - Value of the name shown in the dropdown list. * - - * - *Mandatory* - True * - *Data Type* - String .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **formValuesPrefix** - | Prefix of form fields. Use this if you use a prefix for your forms to avoid conflicts with other plugins. | Settings this option you will be able to use only the fieldname in all markers and do not need to add prefix. * - - * - *Mandatory* - False * - *Data Type* - String * - *Default* - tx_formhandler_form * - *Note* - It is highly recommended to use this setting! .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **langFileDefault** - Path to default language file, can be altered as parameter by the form fields. * - - * - *Mandatory* - False * - *Data Type* - String .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **conditionBlocks** - Settings to handle condition block. * - - * - *Mandatory* - False * - *Data Type* - Array`> .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **fileUpload** - Settings to handle file uploads. * - - * - *Mandatory* - False * - *Data Type* - :ref:`FileUpload ` .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **debuggers** - A list of :ref:`Debuggers` for the predefined forms. * - - * - *Mandatory* - False * - *Data Type* - Array`> .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **steps** - | You can split a form into as many steps as you like and add as many :ref:`Validators` as you like to each step, | but even if the form has just one step it must be defined to add :ref:`Validators`. * - - * - *Mandatory* - True (Only if a form has needs :ref:`Validators`, otherwise not.) * - *Data Type* - Array * - *Note* - The key Integer in Array starts at 1 for first step. .. list-table:: :align: left :width: 100% :widths: 20 80 :header-rows: 0 :stub-columns: 0 * - **finishers** - A list of :ref:`Finishers` for the predefined forms. * - - * - *Mandatory* - False * - *Data Type* - Array`>