Hi all,
I am developing an application. In this application I have a search
facility for students.
The screen has a search button which if preesed shows result in tabular
format.Also if search is successful two buttons download and detail are
displayed. If download button is presses a csv file ic created having
student data. If we selectt a rdio button in front of student name and press
detail button it opens a new page 'detail.phtml'. This page displays detail
data of student and has got a edit button.
Now on first form if detail burron is pressed I get a new form
studentdetail and set action as detail. Code as below
$isSet = $form->detail->getValue();
if (isset($isSet)) {
$this->getFrontController()->setParam('noViewRenderer', TRUE);
$form = $this->getForm(studentdetail');
$form->setAction('student/detail');
$this->view->form = $form;
if (!$form->isValid($_POST)) {
$this->setErrorMessage($form);
return;
}
$res = $this->getResponse();
$res->appendBody($this->view->render('student/detail.phtml'));
}
In detail action I display detail data of student. Also I set new view and
new form.
I want that to save the edited data if user pressses edit button
$view = $this->getView();
$form = $this->getForm(studentdetail');
$form->setAction('student/detail');
$isSet = $form->edit->getValue();
if (isset($isSet)) {
//save edited data
}
Now if I try press edit button action displayed is student/student/detail.
And page not found error is displayed. So can somebody tel me how to solve
this problem.
--
View this message in context:
http://www.nabble.com/Action-on-button-problem-tp21083875p21083875.html
Sent from the Zend Framework mailing list archive at Nabble.com.