Question about QuickForm Renderers
| From: | John Vincent | Date: | Thu, 28 Aug 2003 19:01:12 +0000 |
| Subject: | Question about QuickForm Renderers | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7447@lists.php.net to get a copy of this message | ||
Hi gang,
I notice there are alot of posts about QuickForm and so I figured this was the best place to start.
I've taken the Default.php from the PEAR renderer directory and copied it into my own include directory. I've now got my form successfully using my template. My problem comes from setting $_groupTemplate within that class.
I wanted to have anything that I set as a group to be contained with the <fieldset> tag.
Here is what I have currently:
/**
* HTML for the current group
* @var string
* @access private
*/
var $_groupTemplate =
"<fieldset> <legend>My Fieldset</legend>{content}</fieldset>\n\t";
My problem is that no matter what I set in _groupTemplate or _groupElementTemplate, it uses the default element template to render.
I've been parsing the code for about an hour now and I can't see where in the Default.php renderer that is happening.
Some might suggest that I use the set functions but I wanted to have a standardized look and feel for all element groups and save myself coding a set after each group was created.
Can anyone provide some advice? I'm really enjoying working with QuickForm but this is really my last hurdle to clear.
FYI, the task I'm attempting to accomplish works fine with:
$renderer->setGroupTemplate("\n\t<fieldset>
<legend>{label}</legend>
{content}
</fieldset>\n\t".'ichkABC');
but as I've said, I use many form groups on a page and really want this to apply to all of them.
As an aside, what's the best place to submit a feature request?
Following the Element Group as <fieldset>, I'd like to be able to use the group header as the <legend> for the <fieldset>.
Thanks in advance and could any replys be followed up to email as well since I'm at the office and not using my normal newsreader?
Thanks once more,
John E. Vincent