| Damien Cros 2006-04-10, 7:00 pm |
| Hi,
I'd like to be able to access each element of the hier select in my
template.
This would look something like:
{$form.myhs.label}
{$form.myhs.firstSelectElement.html}
<some html>
{$form.myhs.secondElement.html}
I know that you can do it with groups. And HTML_Quickform_hierselect
is a child of HTML_Quickform_group. So that should be possible, right?
Here's what I do in my php file:
$myhierselectElement = $form->addElement('hierselect', 'myhs', 'my
label');
$hs = $myhierselectElement->getElements();
$hs->setName('firstSelectElement');
the generated name is myhs[firstSelectElement] in the html file.
According to the smarty manual, {$form.myhs['firstSelectElement']}
(with or without quote) won't be correct here.
I've tried {$form.myhs.firstSelectElement.html} and {$form.myhs
[0].html} (the latter should be correct according to the same manual)
but both don't work.
Can you help me?
Thanks,
Damien
|