Re: Re: QF: smarty renderer and element names with brackets []
| From: | Jeroen Houben | Date: | Wed, 19 Nov 2003 15:37:25 +0000 |
| Subject: | Re: Re: QF: smarty renderer and element names with brackets [] | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9022@lists.php.net to get a copy of this message | ||
Thomas Schulz wrote:
Jeroen Houben wrote in php.pear.general:Okay I'll try that, I was making good progress with the static renderer using groups instead of seperate elements, but then I got stuck again when I had to use groups inside group. Anyway I'll try the Array Renderer. JeroenI'm migrating some QF code from version 2 to 3 using the Smarty renderer. Mostly works well except for some more advanced things. Here's what I want to do: foreach ($institution as $instID => $instName) { $radio[] = &HTML_QuickForm::createElement('radio', null, null, 'Yes', 'yes'); $radio[] = &HTML_QuickForm::createElement('radio', null, null, 'No', 'no'); $form->addGroup($radio, "conn_allowed[$instID]" ,null, ' '); $form->addElement('text', "conn_marketshare[$instID]",null, array("size"=>3, "maxlength"=>3)); }The better way the handle such dynamicly created forms is to use the (dynamic) Array-Renderer. Hi Thomas,