|
Posted by Kevin Carlson on 08/14/05 06:24
Hi,
I have a question regarding the html_checkboxes() plugin/function. I
have it working fine, but wanted to assign CSS classes to each checkbox.
If I can get the internal iteration number of the function somehow, I
could do this.
html_checkboxes() example:
<li>
{html_checkboxes name=admin_checkboxes options=$this->admin_checkboxes
selected=$this->admin_checkboxes_selected separator="</li>\n<li class=
$this->admin_checkboxes_class[NO_KEY_TO_USE]" }
</li>
much longer example, just using smarty's foreach()"
{foreach from=$this->admin_checkboxes key=key item=item }
<li class="{$this->admin_checkboxes_class[$key]}">
<label>
<input type="checkbox" name="admin_checkboxes[]" value="{$key}"
{if $this->admin_checkboxes_selected[$key]}
checked="checked"
{/if}
>{$item}
</label>
</li>
{/foreach}
Not a big deal really, but the html_checkboxes() function does seem to
be more elegant, perhaps this would be a feature request?
Kevin
Navigation:
[Reply to this message]
|