CakePHP 2.0 Determine which submit button has been clicked

后端 未结 4 1749
暖寄归人
暖寄归人 2021-02-06 00:20

In CakePHP 1.3 you can create a form with multiple submit buttons:

echo $this->Form->submit(\'Submit 1\', array(\'name\'=>\'submit\');
echo $this->Fo         


        
4条回答
  •  故里飘歌
    2021-02-06 00:46

    if (!empty($this->request->data['submit']) && $this->request->data['submit'] == "Yes") {
    // do your stuff
    }
    

提交回复
热议问题