You are here: html_checkboxes() feature request? « Smarty Templates Posts « IT news, forums, messages
html_checkboxes() feature request?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация