Issue Bug Closed

#82243Adding properties to "fluidAdditionalAttributes" in form definition leads to lost properties

Denis Mir 08/30/17, 13:53 updated 10/02/18, 10:57

Description

I got the following problem.

I have a custom form element definition in my form configuration:

            CustomEmail:
              __inheritances:
                10: 'TYPO3.CMS.Form.prototypes.standard.formElementsDefinition.Text'
              renderingOptions:
                templateName: 'Text'
              label: 'Email'
              defaultValue: ''
              properties:
                fluidAdditionalAttributes:
                  placeholder: Email
                elementClassAttribute: 'email'
              validators:
                -
                  identifier: NotEmpty
                -
                  identifier: EmailAddress

Normally I’m using it like this in one of my form definitions:

      -
        type: CustomEmail
        identifier: email

This does work fine.

Then I’m trying to add a property to “fluidAdditionalAttributes” in another form definition like so (in this case the email field should be required):

      -
        type: CustomEmail
        identifier: email
        properties:
          fluidAdditionalAttributes:
            required: required

This leads me to an added “required” property in the frontend rendering but the “placeholder” property defined in the form configuration for my “CustomEmail” type is gone.

Reviews 2