TYPO3:
  CMS:
    Form:
      persistenceManager:
        allowedFileMounts:
          10: 1:/user_upload/
        allowSaveToExtensionPaths: false
        allowDeleteFromExtensionPaths: false
        #allowedExtensionPaths:
          #10: EXT:example/Resources/Private/Forms/

      prototypes:
        standard:

          ########### DEFAULT FORM ELEMENT DEFINITIONS ###########
          formElementsDefinition:

            ### BASE ELEMENTS ###
            Form:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
              rendererClassName: 'TYPO3\CMS\Form\Domain\Renderer\FluidFormRenderer'
              renderingOptions:
                __inheritances:
                  10: 'TYPO3.CMS.Form.mixins.translationSettingsMixin'
                templateRootPaths:
                  10: 'EXT:form/Resources/Private/Frontend/Templates/'
                partialRootPaths:
                  10: 'EXT:form/Resources/Private/Frontend/Partials/'
                layoutRootPaths:
                  10: 'EXT:form/Resources/Private/Frontend/Layouts/'
                addQueryString: false
                argumentsToBeExcludedFromQueryString: []
                additionalParams: []
                controllerAction: perform
                httpMethod: post
                httpEnctype: 'multipart/form-data'
                _isCompositeFormElement: false
                _isTopLevelFormElement: true

                honeypot:
                  enable: true
                  formElementToUse: 'Honeypot'

                submitButtonLabel: 'Submit'

                # set this to TRUE if you want to avoid exceptions for FormElements without definitions
                skipUnknownElements: true

            ### FORM ELEMENTS: CONTAINER ###
            Page:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
              implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\Page'
              renderingOptions:
                _isTopLevelFormElement: true
                _isCompositeFormElement: true
                nextButtonLabel: 'next Page'
                previousButtonLabel: 'previous Page'

            SummaryPage:
              __inheritances:
                10: 'TYPO3.CMS.Form.prototypes.standard.formElementsDefinition.Page'
              renderingOptions:
                _isTopLevelFormElement: true
                _isCompositeFormElement: false
                nextButtonLabel: 'next Page'
                previousButtonLabel: 'previous Page'

            Fieldset:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
              implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\Section'
              renderingOptions:
                _isCompositeFormElement: true

            GridContainer:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
              implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GridContainer'
              renderingOptions:
                _isCompositeFormElement: true
                _isGridContainerFormElement: true
              properties:
                elementClassAttribute: 'container'
                # overrules 'GridRow.properties.gridColumnClassAutoConfiguration'
                gridColumnClassAutoConfiguration:
                  gridSize: 12
                  viewPorts:
                    xs:
                      classPattern: 'col-xs-{@numbersOfColumnsToUse}'
                    sm:
                      classPattern: 'col-sm-{@numbersOfColumnsToUse}'
                    md:
                      classPattern: 'col-md-{@numbersOfColumnsToUse}'
                    lg:
                      classPattern: 'col-lg-{@numbersOfColumnsToUse}'

            GridRow:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
              implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GridRow'
              properties:
                elementClassAttribute: 'row'
                gridColumnClassAutoConfiguration:
                  gridSize: 12
                  viewPorts:
                    xs:
                      classPattern: 'col-xs-{@numbersOfColumnsToUse}'
                    sm:
                      classPattern: 'col-sm-{@numbersOfColumnsToUse}'
                    md:
                      classPattern: 'col-md-{@numbersOfColumnsToUse}'
                    lg:
                      classPattern: 'col-lg-{@numbersOfColumnsToUse}'
              renderingOptions:
                _isCompositeFormElement: true
                _isGridRowFormElement: true

            ### FORM ELEMENTS: INPUT ###
            Text:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'

            Password:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'

            AdvancedPassword:
              __inheritances:
                10: 'TYPO3.CMS.Form.prototypes.standard.formElementsDefinition.Password'
              # implementationClassName 'TYPO3\CMS\Form\Domain\Model\FormElements\AdvancedPassword'
              # is deprecated since TYPO3 v8 and will be removed in TYPO3 v9
              # will be 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement' in TYPO3 v9
              implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\AdvancedPassword'
              properties:
                elementClassAttribute: 'input-medium'
                confirmationLabel: ''
                # Optional description (hint) for the first password input element
                #passwordDescription: ''
                confirmationClassAttribute: 'input-medium'

            Textarea:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
              properties:
                elementClassAttribute: 'xxlarge'

            Honeypot:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.TextMixin'
              properties:
                renderAsHiddenField: false
                styleAttribute: 'position:absolute; margin:0 0 0 -999em;'
              renderingOptions:
                _isHiddenFormElement: true

            Hidden:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
              renderingOptions:
                _isHiddenFormElement: true

            ### FORM ELEMENTS: SELECT ###
            Checkbox:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
              properties:
                elementClassAttribute: 'add-on'
                containerClassAttribute: 'input checkbox'
                value: 1

            MultiCheckbox:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.MultiSelectionMixin'
              properties:
                containerClassAttribute: 'input checkbox'

            MultiSelect:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.MultiSelectionMixin'
              properties:
                elementClassAttribute: 'xlarge'

            RadioButton:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.SingleSelectionMixin'
              properties:
                elementClassAttribute: 'xlarge'

            SingleSelect:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.SingleSelectionMixin'

            ### FORM ELEMENTS: CUSTOM ###
            DatePicker:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
              implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\DatePicker'
              properties:
                elementClassAttribute: 'small form-control'
                timeSelectorClassAttribute: 'mini'
                timeSelectorHourLabel: ''
                timeSelectorMinuteLabel: ''
                dateFormat: 'Y-m-d'
                enableDatePicker: true
                displayTimeSelector: false

            StaticText:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.ReadOnlyFormElementMixin'
              properties:
                text: ''

            ContentElement:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.ReadOnlyFormElementMixin'
              properties:
                contentElementUid: ''

            ### FORM ELEMENTS: UPLOADS ###
            FileUpload:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FileUploadMixin'
              properties:
                allowedMimeTypes: ['application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.oasis.opendocument.text', 'application/pdf']

            ImageUpload:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.FileUploadMixin'
              properties:
                allowedMimeTypes: ['image/jpeg', 'image/png', 'image/bmp']
                elementClassAttribute: 'lightbox'
                imageLinkMaxWidth: 500
                imageMaxWidth: 500
                imageMaxHeight: 500

          ### FINISHERS ###

          finishersDefinition:
            Closure:
              implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\ClosureFinisher'
              options:
                #closure:

            Confirmation:
              implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\ConfirmationFinisher'
              options:
                #message: ''
                #variables:
                templateName: 'Confirmation'
                templateRootPaths:
                  10: 'EXT:form/Resources/Private/Frontend/Templates/Finishers/Confirmation/'

            EmailToSender:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'

            EmailToReceiver:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'

            DeleteUploads:
              implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\DeleteUploadsFinisher'

            FlashMessage:
              implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\FlashMessageFinisher'
              #options:
                #messageBody: ''
                #messageTitle: ''
                #messageArguments: {}
                #messageCode: 0
                #severity: 0

            Redirect:
              implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\RedirectFinisher'
              #options:
                #pageUid: 1
                #additionalParameters: ''
                #delay: 0
                #statusCode: 303

            SaveToDatabase:
              implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\SaveToDatabaseFinisher'
              #options:
                #table: ''
                #mode: 'insert'
                #whereClause: []
                #elements:
                #  <elementIdentifier>:
                #    mapOnDatabaseColumn: <databaseColumnName>
                #    saveFileIdentifierInsteadOfUid: false
                #    skipIfValueIsEmpty: false
                #databaseColumnMappings:
                #  <databaseColumnName>:
                #    value: 'someValue'
                #    skipIfValueIsEmpty: false

          ### VALIDATORS ###
          validatorsDefinition:
            NotEmpty:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\NotEmptyValidator'
            DateTime:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\DateTimeValidator'
            Alphanumeric:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\AlphanumericValidator'
            Text:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\TextValidator'
            StringLength:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\StringLengthValidator'
              #options:
                #minimum: 0
                #maximum: 0
            EmailAddress:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\EmailAddressValidator'
            Integer:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\IntegerValidator'
            Float:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\FloatValidator'
            NumberRange:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\NumberRangeValidator'
              #options:
                #minimum: 0
                #maximum: 0
            RegularExpression:
              implementationClassName: 'TYPO3\CMS\Extbase\Validation\Validator\RegularExpressionValidator'
              #options:
                #regularExpression: '/^.*$/'
            Count:
              implementationClassName: 'TYPO3\CMS\Form\Mvc\Validation\CountValidator'
              #options:
                #minimum: 0
                #maximum: 0

      ########### MIXINS ###########
      mixins:
        translationSettingsMixin:
          translation:
            translationFile: 'EXT:form/Resources/Private/Language/locallang.xlf'
            #translatePropertyValueIfEmpty: true

        ########### FORM ELEMENT MIXINS ###########
        formElementMixins:
          BaseFormElementMixin: []
              # The form element type is chosen as the template name by default.
              # If you want another name you can set it with 'templateName'
              #templateName: 'CustomTemplateName'

          ReadOnlyFormElementMixin:
            __inheritances:
              10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
            implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement'
            renderingOptions:
              _isReadOnlyFormElement: true

          FormElementMixin:
            __inheritances:
              10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseFormElementMixin'
            implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement'
            properties:
              containerClassAttribute: 'input'
              elementClassAttribute: ''
              elementErrorClassAttribute: 'error'
              #gridColumnClassAutoConfiguration:
              #  viewPorts:
              #    xs:
              #      numbersOfColumnsToUse: ''
              #    sm:
              #      numbersOfColumnsToUse: ''
              #    md:
              #      numbersOfColumnsToUse: ''
              #    lg:
              #      numbersOfColumnsToUse: ''

          TextMixin:
            __inheritances:
              10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'

          SelectionMixin:
            __inheritances:
              10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'

          SingleSelectionMixin:
            __inheritances:
              10: 'TYPO3.CMS.Form.mixins.formElementMixins.SelectionMixin'

          MultiSelectionMixin:
            __inheritances:
              10: 'TYPO3.CMS.Form.mixins.formElementMixins.SelectionMixin'

          FileUploadMixin:
            __inheritances:
              10: 'TYPO3.CMS.Form.mixins.formElementMixins.FormElementMixin'
            implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\FileUpload'
            properties:
              saveToFileMount: '1:/user_upload/'

        finishersEmailMixin:
          implementationClassName: 'TYPO3\CMS\Form\Domain\Finishers\EmailFinisher'
          options:
            #subject: ''
            #recipientAddress: ''
            #recipientName: ''
            #senderAddress:
            #senderName: ''
            #replyToAddress: ''
            #carbonCopyAddress: ''
            #blindCarbonCopyAddress: ''
            #format: 'html'
            #attachUploads: true
            #translation:
            #  language: 'default'
            # {@format} depends the 'format' value
            templateName: '{@format}.html'
            templateRootPaths:
              10: 'EXT:form/Resources/Private/Frontend/Templates/Finishers/Email/'
            #partialRootPaths: []
            #layoutRootPaths: []
            #variables: {}
