Commit e5196af7 authored by metzlerd's avatar metzlerd
Browse files

Fixed issue with data_source causing validation errors when set with non

select parameters. 
parent c0fdf7e3
......@@ -523,10 +523,15 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
@(strcmp((string)$node['require'], "1") == 0) ? $required = TRUE : $required = FALSE;
$ctl_attrs = array();
//returned values filtered against data_field attr.
if ($data_source) {
$list = Frx::RepoMan()->dataBlockParams($data_source, $data_field, $label_field);
if (!$required && $add_null) $list = array('' => '') + $list;
}
//Determine the form element type to be displayed
//If select or radios is chosen then begin a $list array for display values.
$multiselect = FALSE;
$list = array();
$ajax = FALSE;
$add_null = FALSE;
switch ($type) {
......@@ -590,11 +595,6 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
$list = '';
}
//returned values filtered against data_field attr.
if ($data_source) {
$list = Frx::RepoMan()->dataBlockParams($data_source, $data_field, $label_field);
if (!$required && $add_null) $list = array('' => '') + $list;
}
if (isset($menu_parms[$id]) && $type=='textfield') {
$disabled = TRUE;
}
......@@ -628,8 +628,6 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
);
}
//if $list is not empty then push options
//onto the array. options will cause an error for
//textfield elements.
......
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