Re: Changes to HTML/Form.php
| From: | (Stig Sæther Bakken) | Date: | Sun, 26 Aug 2001 18:24:15 +0000 |
| Subject: | Re: Changes to HTML/Form.php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1698@lists.php.net to get a copy of this message | ||
["Martin Jansen" <mail@martin-jansen.de>]
> 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 ...
I think it'd be time to integrate HTML_Form with a template thingie
when this need arises.
- Stig
--
Stig Sæther Bakken <ssb@alltheweb.com>
Fast Search & Transfer ASA, Trondheim, Norway