[support] Triggering Form Submit

Warren Vail warren at vailtech.net
Fri Aug 5 04:06:40 UTC 2011


Answered my own question;

 

    '#attributes' => array(

      'onChange' => 'this.form.submit();',

    ),

 

Anyone aware of any gotcha's with this one?

 

Warren Vail

  _____  

From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Warren Vail
Sent: Thursday, August 04, 2011 6:34 PM
To: support at drupal.org
Subject: [support] Triggering Form Submit

 

I used to be able to add the following to a select list to trigger form
submission when the selected value was changed.

 

<select ... onChange="this.form.submit(); "

 

This would be executed as javascript and would trigger submission method of
the form object that contained the select widget.  How can I do the same
using the Drupal form definition?  I tried "#ahah" but can't seem to get it
to work.  Any clues?

 

I want to cause the form validation and optionally the post modules to be
executed when the selection has change.

 

Warren Vail

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110804/5c846cf0/attachment.html 


More information about the support mailing list