Re: Missing functionality in HTML_QuickForm.
| From: | Bertrand Mansion | Date: | Tue, 07 Jan 2003 08:01:39 +0000 |
| Subject: | Re: Missing functionality in HTML_QuickForm. | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3203@lists.php.net to get a copy of this message | ||
<eltehaem@poczta.onet.pl> wrote :
> Hello,
>
> Sometimes I want to add static text in the middle of the form I can do
> this in two ways. The first is:
>
> $defaults['test'] = 'text in the middle of the form';
> $form->setDefaults($defaults);
> $el =& $form->createElement('text', 'giodo', null);
> $el->freeze();
> $form->addElement($el);
>
> I think it's ugly, and the second way is:
>
> $form->addData('<tr><td></td><td valign="top">text in
> the middle of the
> form</td></tr>');
>
> I don't like this one too, since I have to add that html around the text
> every time. Shouldn't there be in QuickForm function similar to addData
> but with template (like addHeader)?
Hi Wojciech,
I agree with you, but I don't have the time for that now. Feel free to
create your own element, based on the HTML_QuickForm_Link element for
example, or if you think about another way, let me know. Then, send the code
if you want to share it. TIA
Bertrand Mansion
Mamasam