By corey.aufang on
i have a form that im ajax submitting using the jquery Form plugin.
the form has two submit buttons
$form['save_issue'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
$form['close_issue'] = array(
'#type' => 'submit',
'#value' => t('Close'),
);
The problem is when the form is submitted, it always shows the 'Save' button as being clicked, even when i click on the 'Close' button.
Anyone know the answer?
Comments
How are you attaching the behavior?
Probably you want to avoid explicitly submitting the form when a button is clicked and instead use the ajaxForm() method.
See the ajaxsubmit module's js for sample code http://drupal.org/project/ajaxsubmit
(Or you could consider a dependency on that module.)
I will take a look at this
I will take a look at this module, and if it works, most likely depend it.
Thank you.