Bug #26394

Form Viewhelper does not work with html5 custom data attributes

Added by martin no-lastname-given over 8 years ago. Updated almost 8 years ago.

Must have
Target version:
Start date:
Due date:
% Done:


Has patch:


<f:form.textbox property="name" data-anything="some info" />

Will produce no output at all.

It would be great if fluid's tag-processing was more liberal and transparent in general. Maybe switch to DOM instead of the custom implementation?

Related issues

Duplicated by TYPO3.Fluid - Feature #29065: HTML5 Custom Data Attributes Closed 2011-08-17


#1 Updated by Sebastian Kurfuerst over 8 years ago

  • Status changed from New to Rejected


I guess you are using v4 and do not have your exception handler correctly configured? (in the install tool).

data-anything is not a supported argument by the Form-ViewHelper -- that's why an exception is thrown. If you are in production context, this exception leads to rendering only a white page.

Fix: <f:form.textbox additionalAttributes="{data-anything: 'some info'}" /> should work. If not, please file another bug.

Best regards,

#2 Updated by martin no-lastname-given over 8 years ago

Sorry, must have missed that in the docs :)

#3 Updated by Bastian Waidelich about 8 years ago

  • Has patch set to No

martin wrote:

Sorry, must have missed that in the docs :)

Can you confirm, that the syntax from above works? (because we're not yet sure whether dashes are currently supported in the array syntax.

By the way: We're planning to extend the syntax so that you can specify array items directly like:

<f:form.textbox additionalAttributes.data-anything="some info" />

But that's not yet implemented.

#4 Updated by Thomas Allmer almost 8 years ago

I can confirm that the following syntax works

<f:image src="{image}" alt="" maxWidth="140" maxHeight="280" additionalAttributes="{data-behavior: 'ImageFullDownload', data-imagefulldownload-fulldownload: '{a:uri.imageDownload(src: \'{image}\', maxWidth: 1920, maxHeight: 1200)}'}" />

it may get a little tricky with the ' but it works :)

the additionalAttributes dot syntax sure looks nice - looking forward to it :)

#5 Updated by Bastian Waidelich almost 8 years ago

Thomas Allmer wrote:

I can confirm that the following syntax works

Thanks for the update!

Also available in: Atom PDF