Re: Changes to HTML/Form.php
| From: | Martin Jansen | Date: | Sun, 26 Aug 2001 16:12:51 +0000 |
| Subject: | Re: Changes to HTML/Form.php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1696@lists.php.net to get a copy of this message | ||
On 26 Aug 2001 02:45:38 +0200, Stig Sæther Bakken wrote:
>["Martin Jansen" <mail@martin-jansen.de>]
>> I would like to change the methods in HTML/Form.php to accept a
>> parameter $class, which defines the value for the class="...
>> attribut of the form element.
>>
>> Does anyone object on doing this?
>
>What about having a more free "extra attributes" parameter where you
>can specify any extra attribute?
While thinking about this, I stumbled over some problems:
When using the extra attributes, you have to decide on which
element the attributes should be assigned: When for example
calling displayTextRow() with some extra attributes, the
class does not know, on which tag this attributes should be
applied. To solve this problem, we would have to store the
extra attributes in complex arrays like
$attributes = array
("th" => array(
"class" => "class1",
"id" => "myid"
),
"input" => array(
"class" => "class2"
)
....
);
. It isn't a big problem to implement something like this (at
least I think so), but I'm not sure, if people would start
using such a complex feature ...
- Martin