function forena_data_select_block_validate in Forena Reports 6.2
Same name and namespace in other branches
- 7.2 forena.admin.inc \forena_data_select_block_validate()
- 7.3 forena.admin.inc \forena_data_select_block_validate()
Validates the forena_data_block_form's data_block field.
_state
Parameters
$form:
Return value
unknown_type
1 string reference to 'forena_data_select_block_validate'
File
- ./
forena.admin.inc, line 1873
Code
function forena_data_select_block_validate($form, &$form_state) {
$values = $form_state['values'];
$block_info = array();
$data_block = $values['data_block'];
//validate the data block only if delete block was not chosen
if ($data_block) {
$block_info = FrxReportGenerator::instance()
->load_block($data_block);
}
if (!$block_info) {
form_set_error('data_block', t('Invalid data block.'));
}
}