Re: Quickform textarea formatting
| From: | Dan Wilson | Date: | Thu, 13 Feb 2003 17:37:05 +0000 |
| Subject: | Re: Quickform textarea formatting | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3752@lists.php.net to get a copy of this message | ||
Quoting Bertrand Mansion <bmansion@mamasam.com>:
> le 13/02/03 16:45, Dan Wilson à dan@acucore.com a écrit :
>
> > 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.
>
> Sure, we can add that. I don't really see what you want to do with it.
> Can't you just use $form->setElementTemplate(with nowrap, 'myElement'); and
> do your manipulation in your code.
That's my whole point... in order for me to do the 'with nowrap', I need to be
able to strip that out. I'd much rather strip it out of the existing
template, and then set it back in. I want it to remain exactly the same,
except for the nowrap. So it would look something like this:
$form->setElementTemplate(str_replace('nowrap="nowrap"', '', $form-
>getElementTemplate('myEl')), 'myEl');
Hey... here's a idea: How bout we leave off the nowrap and then we can detect
a group element and set the nowrap for that specific element, rather than
having it there for everything. What do you think of that?
> > 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?
>
> I don't remember receiving it, it might have been blocked by my server.
> Could you please post it again. TIA
I will have to dig it up...
-Dan