function tripal_views_integration_ajax_join_field

2.x tripal_views_integration_UI.inc tripal_views_integration_ajax_join_field($form, $form_state)
1.x tripal_views_integration.inc tripal_views_integration_ajax_join_field($field, $join_field)

File

tripal_views/includes/tripal_views_integration_UI.inc, line 1436
Functions related to the UI for integrating tables with views

Code

function tripal_views_integration_ajax_join_field($form, $form_state) {

  // Determine which row we are dealing with from the name of the triggering element
  if (preg_match('/fields_join_(\w+-\d+)/', $form_state['triggering_element']['#name'], $matches)) {
    $field = $matches[1];
    $join_field = 'fields_join_column_' . $matches[1];
    // return the form element to be updated
    return $form['view_setup_table'][$field]['column-3'][$join_field];
  }
  else {
    tripal_report_error('tripal_views', TRIPAL_ERROR, 
    'Tripal Views Integration Ajax failed due to being unable to determine which row needs updating', array());
    return $form;
  }
}