Re: Quickform
| From: | Justin Patrin | Date: | Wed, 28 Feb 2007 23:38:34 +0000 |
| Subject: | Re: Quickform | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26692@lists.php.net to get a copy of this message | ||
On 2/28/07, Ian Warner <ian.warner@hotxt.net> wrote:
I would like to add a new template element: HELP This would contain an icon where the user can hover over and get some help on that form element. So I would want to register an element the form generation and also below state where I want these outputted.If you just want to have a help icon beside each element then just change the generic element template. If you want to create a new element that has your content you need to create your own element class.
-- Justin Patrinpublic $_elementTemplate = '<!-- BEGIN error --><tr><td colspan="3"><span class="text_red">{error}</span></td></tr><!-- END error --><tr><td>{help}</td><th class="form_field"><!-- BEGIN required --><span class="redtext">*</span><!-- END required -->{label}</th><td>{element}</td></tr>';// Register the helpelement.$form->registerElementType('help','C:/AWebEnvironment/htdocs/HTML/QuickForm/Elements/help.php','HTML_QuickForm_Elements_help');And then create the elements within the usual form Firstly is this possible and how do I create the template positioning element Cheers Ian