Adding a subgroup to a group?
| From: | James Carr | Date: | Wed, 14 Dec 2005 20:23:03 +0000 |
| Subject: | Adding a subgroup to a group? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-22251@lists.php.net to get a copy of this message | ||
I am building a very complex multi page form and I am curious if there
is some kind of way to add a group to a group?
Basically, I have 4 subsections that are exactly identical and would
like to put this in a foreach loop (I am using smarty for rendering).
It would be ideal if I could just add the elements to a group, then
add it to another. Basically something like this would be an input
name (using the normal php convention for form fields being converted
to array index):
name="asset[0][type]"
so I could just do something like:
{foreach from=$assets item=asset}
{$asset.name.label}{$asset.name.html}<br/>
{$asset.type.label}{$asset.type.html}<br/>
.. and so on ...
{/foreach}
At worst, I'll just copy&paste for now. :(
Thanks,
JC