function forena_data_block_form_validate in Forena Reports 6
Same name and namespace in other branches
- 7 forena.admin.inc \forena_data_block_form_validate()
Validates the forena_data_block_form's data_block field.
_state
Parameters
$form:
Return value
unknown_type
File
- ./
forena.admin.inc, line 931
Code
function forena_data_block_form_validate($form, &$form_state) {
$values = $form_state['values'];
$data_block = $values['data_block'];
$delete_blocks = $values['delete_blocks'];
//validate the data block only if delete block was not chosen
if (!$delete_blocks) {
$block_info = forena_load_block($data_block);
if (!$block_info) {
form_set_error('data_block', t('Invalid data block.'));
}
}
}