Re: QuickForm_Controller : overiding the submit and next actions
| From: | Justin Patrin | Date: | Tue, 25 Oct 2005 01:21:40 +0000 |
| Subject: | Re: QuickForm_Controller : overiding the submit and next actions | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21623@lists.php.net to get a copy of this message | ||
On 10/24/05, James Carr <james.r.carr@gmail.com> wrote:
> Hi,
>
> I've been using quickform controller and would like to add some
> actions to take place when a form is submitted. I added the following:
>
> $controller->addAction('next', new ActionSubmit());
>
> In which the class ActionSubmit has a perform method that does what I
> want. This works, but unfortunately it leaves me out in the cold as
> well. It does what I put in there and stops there, completely skipping
> over quickform_controller's default operations. Is there something I
> can call to resume the normal operation?
>
Well, when you use your own action class you're doing your own action.
You need to specify what you want the system to do. For example a
couple of my custom actions call page->handle('display') or
page->handle('jump') conditionally based on what needs to be done.
--
Justin Patrin