JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: add radio button support
[wfpl.git] / metaform.php
index a9d3956..1bdd940 100644 (file)
@@ -45,7 +45,7 @@ $GLOBALS['types'] = array(
        'textarea' =>   array('textarea',    'unix',       'text'),
        'html' =>       array('html',        'unix',       'text'),
        'pulldown' =>   array('pulldown',    'options',    'varchar(100)'),
-       'radio' =>      array('radio',       'oneline',    'varchar(200)'),
+       'radio' =>      array('radio',       'options',    'varchar(100)'),
        'checkbox' =>   array('checkbox',    'bool',       'int(1)'),
        'yesno' =>      array('checkbox',    'yesno',      'varchar(3)'),
        'delete' =>     array('checkbox',    'yesno',      'n/a'),
@@ -381,7 +381,7 @@ function make_php() {
                        } else {
                                if($input == 'html') {
                                        $has_html_editors = true;
-                               } elseif($input == 'pulldown') {
+                               } elseif($input == 'pulldown' || $input == 'radio') {
                                        $tem->show('pulldowns');
                                        $tem->show('pulldown_format_extra');
                                }
@@ -479,7 +479,7 @@ function preview() {
        $fields = get_fields();
        foreach($fields as $field) {
                list($name, $type, $input, $format, $sql) = $field;
-               if($type == 'pulldown') {
+               if($type == 'pulldown' || $type == 'radio') {
                        pulldown($name, array('option 1', 'option 2', 'option 3'));
                }
        }