I have two forms with two submit buttons in one page, one view and one controller should manage them. I want it to perform one action if the first one is clicked, and another action – if the second. I tried this where edit is the name of the form but it doesn’t work:
if($this->getRequest()->get('edit'))
I also tried setting value to the submit buttons but I could’t make it go, too. Please help me to find a way how to identify which button was pressed. 🙂
Give buttons different “name” (not “id”) attributes
Then the controller should analyze the POST data for a variable whose name will be the name of the clicked button: