Bug #26394
Form Viewhelper does not work with html5 custom data attributes
Status: | Rejected | Start date: | 2011-04-28 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | ViewHelpers | |||
Target version: | - | |||
Has patch: | No | Affected Flow version: |
Description
<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
History
#1 Updated by Sebastian Kurfuerst over 4 years ago
- Status changed from New to Rejected
Hey,
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,
Sebastian
#2 Updated by martin no-lastname-given over 4 years ago
Sorry, must have missed that in the docs :)
#3 Updated by Bastian Waidelich almost 4 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 4 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 4 years ago
Thomas Allmer wrote:
I can confirm that the following syntax works
Thanks for the update!