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
Answered my own question;
'#attributes' => array(
'onChange' => 'this.form.submit();',
),
Anyone aware of any gotcha's with this one?
Warren Vail
_____
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Warren Vail Sent: Thursday, August 04, 2011 6:34 PM To: support@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