Ctools

Use Ctools Autosubmit

Since version 1.7 of ctools there is a new js api to auto-submit certain form elements.
Everytime a user changes a selectfield or inputs something into a textfield a button will be clicked automatically by js.

It's really easy to implement for your form:

  • First you need to add the js
    <?php
    // Add ctools specific js.
    ctools_add_js('auto-submit');
    ?>
  • Assign the autosubmit for a certain button:
    <?php
    // Add autosubmit button.

Ist die aktuelle Seite ein Panel

Mithilfe von panels_get_current_page_display() kann man das aktuelle Display in der preprocess_page laden.

Subscribe to RSS - Ctools