I have a view that in that view I set up 3 exposed filter, all filtering working fine.
- First: Filter by contact first name
- Second: Filter by Project name
- Third: Filter by Contact region/location
The third filter should be shown just for specific logged in user, and that user should be Administrator.
I tried the following codes and it does not working, even doesn't show the Var_dump, so how should it change to work?
function my_modulename_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'views_exposed_form') {
//unset($form['average']);
var_dump($form);
die();
}
}
Here I attached my view configuration and settings may help you to get what I have in my view
if
statement and saying it does not change anything is quite broad. I doubt that is the real code you are using; if that is the code you wrote so far, then the question is really broad.