This is regular Views selector exposed to user:

This is regular Views selector exposed to user

This is a part of block, attached to Panel on main page. I want to create links "show expiring" and "show latest" but I need to learn what function is fired while clicking Apply. Anyone knows where can I find it? Debugging it with Chrome is tricky, a lot of JS files…

Is there a way of previewing all javascript acitvity?

  • modules/views/js/ajax_view.js - maybe somewhere there… I keep investigating.
    – wtk
    Dec 12, 2011 at 15:16

1 Answer 1


The image above shows an exposed form generated by Views in the file views_plugin_exposed_form.inc. Line 242 in the function exposed_form_alter reads $form['#attached']['js'][] = drupal_get_path('module', 'ctools') . '/js/auto-submit.js'; so the js looks to be in ctools however, I believe that script is being called whenever a change is made on the form. If you want to modify the form note that views is managing the form in this file. Selecting the 'Apply' button calls exposed_form_validate and exposed_form_submit which are tapping into the Drupal form API (php not JS). Go to api.drupal.org to find out more about the various hooks available to modify the forms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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