php - Two different actions in a form cakephp -


i using cakephp 2.4 , want form 2 buttons each button should have own action don't know how can redirect submit-a action1 , submit-b action2.

<div class="form information">  <?php echo $this->form->create('soya', array('action' => 'reportecompravsprod')); ?>  <?php // here goes forms  ?>  <div class="submit">     <?php        echo $this->form->submit('vista', array('class' => 'form-submit',  'name' => 'submit-a'));     echo $this->form->submit('reporte', array('class' => 'form-submit',  'name' => 'submit-b'));      ?> </div> </div> 

using javascript, there many ways accomplish you're trying do.

the easiest make onclick() on button, , change "action" of form before submitting.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -