/**
* Form alter hook Callbacks and helpers
*/
function _mymodule_formalter_exported_filter(&$form) {
$filter_id = 'workflow_node.sid'; //set this to the id of the filter. use print_r($form['view'][#value']->filter) to find the ID
foreach($form['view']['#value']->filter as $filter) {
if ($filter['field'] == $filter_id) {
$only_these = $filter['value'];
break;
}
}
foreach ($form['filter0']['#options'] as $key => $option) {
if (in_array($key, $only_these)) {
$options[$key] = $option;
}
}
$form['filter0']['#options'] = $options;
if(is_array($form['filter0']['#default_value'])) {
$form['filter0']['#default_value'] = 40; //or any other value.
}
}