You are here

function forena_query_add_filter in Forena Reports 7.3

Add another field to the filter.

_state

Parameters

unknown_type $form:

1 string reference to 'forena_query_add_filter'
_forena_query_filter_ctl in ./forena_query.inc
Recursively build query form.

File

./forena_query.inc, line 541

Code

function forena_query_add_filter($form, &$form_state) {
  $where = $form_state['values']['where'];
  _forena_query_clean_values($where, $form['where']);

  // Determine containing field of pressed button.
  $parents = $form_state['triggering_element']['#parents'];
  array_shift($parents);
  array_pop($parents);
  $field = array_fill_keys(array(
    'field',
    'op',
    'value',
  ), '');
  _forena_query_add_parent_data($where, $parents, $field);
  $form_state['storage']['builder']['where'] = $where;
  $form_state['rebuild'] = TRUE;
}