Изменение фильтра в exposed форме типа textfield на select
1) С помощью хука hook_form_alter
1) С помощью хука hook_form_views_exposed_form_alter
1) С помощью хука hook_form_alter
function mymodule_form_alter(&$form, &$form_state, $form_id) {
if($form_id=='views_exposed_form') {
$tmp = $form['field_foofieldname_value'];
$tmp['#type']='select';
$tmp['#options'] = array(''=>t('Any'),"12"=>12,"13"=>13,"14"=>14);
$tmp['#default_value']='';
$tmp['#size']='null';
$form['field_foofieldname_value']=$tmp;
}
1) С помощью хука hook_form_views_exposed_form_alter
function mymodule_form_views_exposed_form_alter(&$form, $form_state) {
//ловим форму по id
if ($form['#id'] == 'views-exposed-form-myviewsname-page-1'){
//ловим форму по id
if ($form['#id'] == 'views-exposed-form-myviewsname-page-1'){
$tmp = $form['field_foofieldname_value']; $tmp['#type']='select';
$tmp['#options'] = array(''=>t('Any'),"12"=>12,"13"=>13,"14"=>14);
$tmp['#default_value']='';
$tmp['#size']='null';
$form['field_foofieldname_value']=$tmp;
$tmp['#options'] = array(''=>t('Any'),"12"=>12,"13"=>13,"14"=>14);
$tmp['#default_value']='';
$tmp['#size']='null';
$form['field_foofieldname_value']=$tmp;
}
}
}