modified html_checkboxes function
| From: | olinux | Date: | Thu, 17 Apr 2003 21:20:00 +0000 |
| Subject: | modified html_checkboxes function | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9307@lists.php.net to get a copy of this message | ||
Hey all,
I needed an option that allowed me more flexibility
with html_checkboxes so I made a couple mods to
Monte's html_checkboxes function
I have a form with checkboxes for the 50 US states.
Now I can output to array and shoot it into html_table
changes:
-> optional output to assign var
-> optional disable parameter specifies checkboxes
that should be disabled
Usage example
{html_checkboxes name="states"
options=$states_checkbox
selected=$states_checkbox_selected
disabled=$states_checkbox_disabled assign=data}
{html_table loop=$data cols=4}
Here's the code:
http://www.rssnewsfeeds.com/tmp/function.html_checkboxes.txt
Changes are on the following lines
16,19 - input definitions
35, 38, 63-65, 72-74, 86 - init values
96-99, 107-111 - build string or array
116-120 - assign or output
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com