",
);
$data['field_types'][$column_name] = $column_type;
if(isset($setup_id)){
$p = $i - 1;
$table = $mview_joins["$p"]->chado_table_join;
$form_state['storage']["fields_join_$mview_id-$i"] = $table;
dpm($table,'table');
}
else{
$table = $form_state['storage']["fields_join_$mview_id-$i"];
}
$form['view_setup_table']["fields_join_$mview_id-$i"] = array(
'#type' => 'select',
'#prefix' => "
",
'#suffix' => "
",
'#options' => $chado_tables,
'#required' => FALSE,
'#default_value' => $table,
'#ahah' => array(
'path' => ahah_helper_path(array("view_setup_table","fields_join_column_$mview_id-$i")),
'wrapper' => "fields-column-join-column-$mview_id-$i",
'effect' => 'fade',
'event' => 'change',
'method' => 'replace',
),
);
if($table){
$table_desc = module_invoke_all('chado_'.$table.'_schema');
$columns = array_keys($table_desc['fields']);
} else {
$columns = array('Select Join Column');
}
$form['view_setup_table']["fields_join_column_$mview_id-$i"] = array(
'#type' => 'select',
'#prefix' => "
",
'#suffix' => "
",
'#options' => $columns,
'#required' => FALSE,
);
$column_name = $mview_joins["$p"]->view_column;
$default_handlers = db_fetch_object(db_query("SELECT handler_filter, handler_field FROM {tripal_views_handlers} WHERE setup_id = '$setup_id' AND column_name = '$column_name';"));
dpm($default_handlers, 'default handlers');
dpm($handlers_fields,'handlers');
$form['view_setup_table']["fields_field_handler_$mview_id-$i"] = array(
'#type' => 'select',
'#prefix' => "
".
"
",
'#suffix' => "
",
'#options' => $handlers_fields,
'#required' => FALSE,
// '#'
);
$form['view_setup_table']["fields_filter_handler_$mview_id-$i"] = array(
'#type' => 'select',
'#prefix' => "
",
'#suffix' => "
",
'#options' => $handlers_filters,
'#required' => FALSE,
);
$form['view_setup_table']["fields_end_$i"] = array(
'#type' => 'markup',
'#value' => "