Re: Quickform textarea formatting
| From: | Dan Wilson | Date: | Thu, 13 Feb 2003 15:45:07 +0000 |
| Subject: | Re: Quickform textarea formatting | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3746@lists.php.net to get a copy of this message | ||
Quoting Bertrand Mansion <bmansion@mamasam.com>:
> le 13/02/03 16:17, Dan Wilson à dan@acucore.com a écrit :
>
> > I would much rather have the nl2br... that way, it won't push the
> surrounding
> > table out and will keep a consistent look with the other text.
>
> I will probably go with nl2br().
> This was suggested to me a few days ago by Carsten Bleek already.
>
> > In addition to the <pre>, I also was wondering about the nowrap tag... why
> is
> > that in there. I could understand it being on the label side, but not on
> the
> > values. I know I can strip this out in the _elementTemplate, but I don't
> see
> > the purpose in it at all. Why would anyone want that on the side where the
> > values are displayed... if they have a large text area, the user could skew
> > their table layout by typing a long paragraph without any hard returns.
> >
> > I say we move it from the value td to the label td.
>
> As you can change it in your own element template, I won't change it in the
> default template. The main reason is for grouped elements. For instance, if
> you have 2 textfields, one for firstname and one for lastname, and you want
> both of them on the same line, you need nowrap otherwise they might end up
> with one above the other. I hope you see my point.
I see your point... I hadn't used grouped elements yet, so hadn't run accross
that situation.
Can we add a getElementTemplate function? That way, I can pull back the
current value, manipulate it and then set it with setElementTemplate. I know
I can get to this through the actual variable _elementTemplate, but that's not
good OOP, and it might not be supported in PHP5.
Thanks,
-Dan
PS. I sent you an email a few months or so ago that included some code to
allow for default attributes for given types. I never got a response. Did
you not get that?