HTML QuickForm: setGroupElementTemplate won't display separator
| From: | Barry Kafka | Date: | Wed, 03 Sep 2003 21:05:48 +0000 |
| Subject: | HTML QuickForm: setGroupElementTemplate won't display separator | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7571@lists.php.net to get a copy of this message | ||
Hi. Just starting with PEAR and this package and I'm
very pleased so far.
I think this is easy but I couldn't get it yet.
My problem: I created a group of text inputs for a
telephone number with extension, and want to display a
field label similar to the example shown at top in
QuickForm_example7.php.
The label displays properly according to my template,
but the separator doesn't. If I don't
setGroupElementTemplate, the separator character
displays properly per default.
Something must be missing from my template but I don't
know how to call it. (It's not {separator}.)
Here's my code for the group template:
$renderer->setGroupElementTemplate('<span
style="float:left;">{element}<br /><span
style="font-size:10px;"><!-- BEGIN required --><span
style="color: #f00">*</span><!-- END required --><span
style="color:#996";">{label}</span></span></span>',
'wkfon2');
Side note on _example7, it closes the <form> tag
before any form fields are displayed. The fix is to
move "<form{attributes}>" before "<table. . ." and
"</form>" to the very end of the setFormTemplate line.
Thanks in advance for help on the separator issue.
Barry
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com