Commit 5b4d8740 authored by metzlerd's avatar metzlerd
Browse files

Added propmpting for select fields so that they don't always default.

parent 45178804
......@@ -633,6 +633,11 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
//onto the array. options will cause an error for
//textfield elements.
if ($list || $type == 'select' || $type =='radios') {
if ($add_null) {
$prompt = @$options['prompt'];
if (!$prompt) $prompt = $required ? '-select-' : '-none-';
$form['params'][$id]['#empty_option'] = $prompt ;
}
$form['params'][$id]['#options'] = $list;
$form['params'][$id]['#multiple'] = $multiselect;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment