I have action: public function addBookAction()
$form = new Form_Books();
$request = $this->getRequest();
$this->view->form = $form;
And In form I have submit button: $this->addElement('submit', 'submit', array(
'ignore' => true,
'label' => 'Submit',
How can I make Cancel button ? I think I can't make button cancel type 'submit' because after clicked this button it will be executed action addBookAction() and book will be added. So what is the solution ?
> I have action:
> public function addBookAction()
> $form = new Form_Books();
> if ($this->getRequest()->isPost())
> $request = $this->getRequest();
> if ($form->isValid($request->getPost()))
> $this->view->form = $form;
> And In form I have submit button:
> $this->addElement('submit', 'submit', array(
> 'ignore' => true,
> 'label' => 'Submit',
> How can I make Cancel button ? I think I can't make button cancel type
> 'submit' because after clicked this button it will be executed action
> addBookAction() and book will be added.
> View this message in context: http://www.nabble.com/how-can-I-create-Cancel-button---tp25528935p25528935.html > Sent from the Zend Framework mailing list archive at Nabble.com.
Have fun or die trying - but try not to actually die.
Dude, did you even read that ZendX_JQuery page? Seriously. Take
another look at the Introduction, 2nd paragraph (the one after the
bullets). If you can't find it look at the very bottom of the page
(you need to scroll to get there) above the horizontal rule separating
the main content from the Prev and Next links. The very last paragraph
above that horizontal rule is the one you want. Read the whole thing.
As Padraic said in another thread, read the docs before posting to the
mailing list. And I'll add another recommendation: do a little
experimentation on your own first.
Anyways, if you're going to use Zend Framework then get over Symphony
and ASP.NET or keep it to yourself. Listening to you going on and on
about them is getting old. Besides, all frameworks are different and
if you are fixated on one it will be much more difficult to learn