Re: Quickform hierselect: how to use it with smarty

From: Date: Tue, 11 Apr 2006 15:45:09 +0000
Subject: Re: Quickform hierselect: how to use it with smarty
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23622@lists.php.net to get a copy of this message
Anyone? On 10 avr. 06, at 18:30, Damien Cros wrote:
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 --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.general (#23622) next »