diff options
Diffstat (limited to 'views/default/input/checkboxes.php')
-rw-r--r-- | views/default/input/checkboxes.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php new file mode 100644 index 000000000..22af8d994 --- /dev/null +++ b/views/default/input/checkboxes.php @@ -0,0 +1,12 @@ +<?php
+
+ foreach($vars['options'] as $option) {
+ if (!in_array($option,$vars['value'])) {
+ $selected = "";
+ } else {
+ $selected = "checked = \"checked\"";
+ }
+ echo "<label><input type=\"checkbox\" {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option)."\" {$selected} />{$option}</label><br />";
+ }
+
+?>
\ No newline at end of file |