Re: QF SmartyArray with radio buttons

From: Date: Tue, 27 Jan 2004 12:14:42 +0000
Subject: Re: QF SmartyArray with radio buttons
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10378@lists.php.net to get a copy of this message
Jeroen Houben wrote in php.pear.general: > I'm converting old QF (2.x) code so it can work with QF 3.x and make use > of the SmartyArray renderer. I'm a bit puzzled as to why the following > code gives me notices. I'm runnig Smarty 2.6 and the latest stable > quickform 3.2.1). Hello Jeoren, using the current CVS-Version of ArraySmarty this works, because I test this with your requirements and also send you this reworked Smarty-Render last at the end of november. --- form definition ---- $institution = array( '1' => 'First Inst', '2' => 'Second Inst', 'drei' => 'Third Inst', ); foreach ($institution as $instID => $instName) { $radio = array(); $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, '&nbsp;&nbsp; &nbsp;'); $form->addElement('text', "conn_marketshare[$instID]",null, array ("size"=>3, "maxlength"=>3)); } --- template ---- {foreach key=key item=radiogroup from=$form.conn_allowed} <p>{$radiogroup.html} {$form.conn_marketshare.$key.html}</p> {/foreach} You can get the CVS-Version here: http://cvs.php.net/co.php/pear/HTML_QuickForm/QuickForm/Renderer/ArraySmart y.php?login=2&r=1.5 ThS. -- http://4bconsult.de

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