Re: HTML_QuickForm_Controller: Best way to pilot page transition with link elements?
| From: | Alexey Borzov | Date: | Tue, 09 Dec 2003 16:08:56 +0000 |
| Subject: | Re: HTML_QuickForm_Controller: Best way to pilot page transition with link elements? | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9418@lists.php.net to get a copy of this message | ||
Hi!
Answering to pear-general as well, as this may be of interest to other users.
Massimiliano Bariola wrote:
Well, actions are bound to buttons for quite simple reason: we need to submit the current form-page before going to the other page to be able to save its values. You can, of course, write some JS to submit the form when the user clicks on the link. To pass the action name, you can use the special hidden element: http://pear.php.net/manual/en/package.html.html-quickform-controller.html-quickform-page.setdefaultaction.php Of course, this is not quite recommended. ;]AB> Well, as you probably noticed yourself, the first page has *nothing* to AB> do with forms. Thus I see no real reason in creating it via AB> QF/QFC. I did :) I forgot to mention the button on first page to add a new item, loading up a blank "page 2", but that's easy. yet, I still wonder ..... is there a "best way" to instruct the QFC to which page it should go, using links+args and not buttons? I am referring to the various document.main.blahblah methods usually called for this. but what to pass them to be QFC-Friendly?First page would contain a list of the records, sorted by date. Each row entry would be composed of be a link (this is the point) leading to page 2, detailing the item corresponding to the link, and a "preview" link showing the current rendering of the item.