diff options
Diffstat (limited to 'tpl/general')
-rw-r--r-- | tpl/general/inc_form.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tpl/general/inc_form.php b/tpl/general/inc_form.php index 8cd2ad5..24e4a49 100644 --- a/tpl/general/inc_form.php +++ b/tpl/general/inc_form.php @@ -13,6 +13,14 @@ foreach($fields as $f) { if (isset($f['type']) && $f['type'] == 'textarea') { echo '<label>' . $f['label'] . '</label><br />'; echo '<textarea name="' . $f['name'] . '">' . $f['value'] . '</textarea><br />'; + } else if (isset($f['type']) && $f['type'] == 'select') { + echo '<label>' . $f['label'] . '</label>'; + echo '<select name="' . $f['name'] . '">'; + foreach ($f['choices'] as $id => $text) { + echo '<option value="' . $id . '"'. ($id == $f['value'] ? ' selected="selected"' : '') . + '>' . $text . '</option>'; + } + echo '</select><br />'; } else { ?> <label for="ff_<?php echo $f['name']; ?>"><?php echo $f['label']; ?></label> |