Thank you for visiting Tomadoh.com! While we do allow the public to browse most of this site, it is primarily a testing ground for custom functionality which is largely unlinked. If you are interested in hiring us please use the contact form. We specialise in custom web apps and complex websites. We are not, however, design drivin, and while we can point you in the direction of some talented designers, we do not ourselves do design work.

Drupal 7 Autosubmit

Quick and easy way to add autosubmit to any form in the constructor function (this can also be done in a form alter). I have Ctools installed on every site I run, so this is the best way I have found to prevent duplicate code and ensure graceful degredation.


  $form['#attributes'] = array('class' => array('ctools-auto-submit-full-form'));
  $form['#attached']['js'][] = drupal_get_path('module', 'ctools') . '/js/auto-submit.js';
  $form['submit']['#attributes']['class'][] = 'ctools-auto-submit-click';
  $form['submit']['#attributes']['class'][] = 'js-hide';

DSCN1517

DSCN1473

DSCN1194

DSCN1193

DSCN1134

DSCN1461.JPG

Image: 
Albums: 

DSCN1295.JPG

Image: 
Albums: 

DSCN1316.JPG

Image: 
Albums: 

DSCN1345.JPG

Image: 
Albums: 

Pages

Subscribe to Tomadoh - DohTeam RSS