Bug #42947

TextareaViewHelper is missing required attribute for html5

Added by Dominic Garms about 9 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
Category:
ViewHelpers
Target version:
-
Start date:
2012-11-14
Due date:
% Done:

0%

Estimated time:
Has patch:
No

Description

Hi,

the required attribute is missing in the TextareaViewHelper, which is important for client-side validation for modern browsers / and polyfill fallbacks if using webshim libs.

Would be great to have,

Regards,
Dominic


Related issues

Related to TYPO3.Fluid - Feature #36249: Add autocomplete property to form input fieldRejected

Actions
#1

Updated by Adrian Föder about 9 years ago

  • Status changed from New to Rejected
  • Priority changed from Should have to Won't have this time

Hi Dominic,

at this time, you are able to use the "additionalAttributes" argument, for example
<f:foo class="bar" additionalAttributes="{required: 'required'}" />.

Feel free to ask back if something is not clear yet :)

(edited since I confused two issues)

#2

Updated by Adrian Föder about 9 years ago

  • Status changed from Rejected to New
  • Priority changed from Won't have this time to -- undefined --
#3

Updated by Adrian Föder about 9 years ago

  • Category set to ViewHelpers
  • Status changed from New to Rejected
  • Assignee set to Adrian Föder
  • Priority changed from -- undefined -- to Won't have this time

I thought I remember an issue specifically affecting the required thingie; but I'm not sure. So far I still think "additionalArguments" should be the way to go.

#4

Updated by Christian Knuth over 6 years ago

this is so bad. it's developer unfriendly and not intuitive. Any reason why unknown attributes are not passed-through?

#5

Updated by Vitoandre D'Oria almost 5 years ago

Christian Knuth wrote:

this is so bad. it's developer unfriendly and not intuitive. Any reason why unknown attributes are not passed-through?

Probably for validation reasons (but why...). What's more frustrating is, that additionalAttributes as mentioned above doesn't work as it should:

additionalAttributes="{f:if(condition: '{object.required}', then: '{required: \'required\'}', else: '{}')}"

Fluid doesn't support empty arrays but additionalAttributes needs an array. The else case will generate a empty string and throw an error. See #50555

So what is required (no phun intended) to have the workaround working for the workaround you may ask? Assign a empty array variable inside your Controller and use this instead in the else branch.

Also available in: Atom PDF