Search code examples
typo3typo3-9.x

add data-attributes to form elements in TYPO3 FORM


i want to implement parsley in a form made with the FORM extension in TYPO3 9 LTS. I cannot find a possibility to add data attributes to any form element, neither in the fluid templates nor in the yaml files. Is it possible?

Thanks!


Solution

  • OK, it is easy enough ... shame on me :-)

     type: Text
       identifier: myname
       properties:
         fluidAdditionalAttributes:
           placeholder: 'Name of Field'
           data-something: 'anything'