Hello,<div><br></div><div>I am having two form submit buttons on a single page, somethings like this:</div><div><br></div><div><div>$form['submit1'] = array(</div><div> '#type' => 'submit',</div>
<div> '#value' => t('save'),</div><div> '#submit' => array('test_submit1'),</div><div> </div><div> );</div><div> </div><div>[some more for elements in between]</div><div><br>
</div><div> $form['submit2'] = array(</div><div> '#type' => 'submit',</div><div> '#value' => t('Save'),</div><div> '#submit' => array('test_submit2'),</div>
<div> </div><div> );</div></div><div><br></div><div><br></div><div>Now, whether I click on any of them, the submit callback of second button is called always. But if I change the value of second button or give them different '#name', everything gets back in place. They call their submit functions respectively.</div>
<div><br></div><div>I did not expect such a behavior given this:</div><div><br></div><div><a href="http://drupal.org/node/144132#buttons">http://drupal.org/node/144132#buttons</a></div><div><br></div><div>Although, they both have same #value but will have different ids in the form, so Drupal has every reason to differentiate between them (or not??). Why is such thing happening? Am I missing something?</div>
<div><br></div><div>--<br>Regards,<br>Nitin Kumar Gupta<br><a href="http://publicmind.in/blog/" target="_blank">http://publicmind.in/blog/</a><br>
</div>