[SMARTY] html_checkboxes() feature request?

Kevin Carlson <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <1123989889.17227.14.camel@grundle>
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

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.