Bug #3792

Special tag attributes for form view helpers are missing (e.g. size)

Added by Christopher Hlubek over 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Category:
ViewHelpers
Target version:
-
Start date:
2009-06-28
Due date:
% Done:

100%

Estimated time:
Has patch:

Description

Form input elements can have a lot of HTML attributes e.g. for the size or maxlength. These are missing for the TextareViewHelper and TextboxViewHelper. So currently no size can be set for text input fields! Apart from standard attributes, there are also proprietary attribues (e.g. for auto completion), that should be supported.

#1

Updated by Bastian Waidelich over 12 years ago

Christopher Hlubek wrote:

Form input elements can have a lot of HTML attributes e.g. for the size or maxlength.
These are missing [...]

Note, that all tag based viewhelpers have the argument "additionalAttributes". So you can do

<f:form action="foo" additionalAttributes="{target: '_blank', myCustomAttribute: 'freedom'}" />

Please close the ticket if that solves your problem.

Bastian

#2

Updated by Christopher Hlubek over 12 years ago

It solves my problem at first glance, but standard attributes like size for an input element should really be settable directly on the tag. So I think we should add the most used attributes to the form view helpers.

#3

Updated by Bastian Waidelich over 12 years ago

Christopher Hlubek wrote:

standard attributes like size for an input element should really be settable directly on the tag.

TextboxViewHelper already has an attribute size!
TextareaViewHelper knows rows and cols.

So I think we should add the most used attributes to the form view helpers.

Afaik we've already implemented support for all standard attributes (based on http://w3schools.com/tags/). Which attributes are you missing?

Bastian

#4

Updated by Christopher Hlubek over 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Apparently the size was added by me already. Then I'll close the ticket.

Also available in: Atom PDF