Re: Re: Smarty loops and check boxes

From: Date: Thu, 14 Aug 2003 11:33:54 +0000
Subject: Re: Re: Smarty loops and check boxes
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7197@lists.php.net to get a copy of this message
Graeme Merrall wrote in php.pear.general: > Yeah using the static renderer for now. As mentioned by Bertrand, you should use addGroup() to define a group of radios/checkboxes. With the static renderer you now have 3 different possibilities to access this group: 1. Output the hole group (separator definded in addGroup): {$form.remove.html} 2. Output every element manually {$form.remove.0.html} {$form.remove.1.html} 3. loop through the group with Smarty: {foreach from=$form.remove item=checkbox} {$checkbox.html} {$checkbox.label} {/foreach} Please have a closer look at the array produced by the static renderer. Thomas. -- http://4bconsult.de

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