0

I am using view exposed filter on a view display as "block". The block is added to dashboard.

I added a second function to "Apply" button using hook_form_alter. I want to hide the expose form of view after submit it. I added the jquery to hide the element using drupal_add_js. But it didn't work.

Is there any way to hide the form or reload the page after submit of expose form so i can hide the form on page load?

0

Try this:

function custom_form_views_exposed_form_alter(&$form, &$form_state, $form_id) {
  if ($form['#id'] == 'views-exposed-form-YOURVIEWNAME') {
    if($_GET['xxx'] == 0){
      hide($form);
    }   
  }
}
  • Thanks. But I don't even remember my scenario. It was a very very old question. :P :) – Sumit Madan Apr 21 '15 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.