Re: HTML_QuickForm_Controller + URL parameters
| From: | Aaron | Date: | Tue, 16 Dec 2003 14:17:11 +0000 |
| Subject: | Re: HTML_QuickForm_Controller + URL parameters | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9574@lists.php.net to get a copy of this message | ||
Yes, I know that the forms can create a new action attribute and this
implementation does work with just QuickForm, but with QuickForm_Controller
(at least in the examples) it appears that you don't instantiate a new Form
directly. I have not tried the other solutions yet ....I'll let you know
the results ASAP. Thanks to you and Alexey for your help.
"Helgi" <helgi@trance.is> wrote in message
news:20031216112424.54389.qmail@pb1.pair.com...
> Hmm when I looked better in the docs then I found what does the trick :)
> $form = new HTML_QuickForm('fooo', 'post', '?page=1');
>
> for more info for people that needed the same:
>
http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.html-quickform.php
>
> Helgi wrote:
>
> > Well in my opinion it would be best if there was a something like
> > $form->addElement('action', '?page=1',); for those people that need
> > to
> > have url parameters ... Or people like me that use my own redirect
> > function ;P
> >
> > At least this would be a nice feature :)
> >
> > Alexey Borzov wrote:
> >
> >> Hi!
> >>
> >> Aaron wrote:
> >>
> >>> I can get the QuickForm_Controller to work except for when I have a
page
> >>> that receives parameters (related to page navigation) via the url.
> >>>
> >>> For example I have a plain page that loads at index.php without the
> >>> form,
> >>> but index.php?page=1 loads a page with the form. Therefore when I
> >>> submit
> >>> the form it takes me back to index.php, instead of index.php?page=1.
> >>> I've
> >>> noticed that the QuickForm_Controller does not let you load a custom
> >>> action
> >>> for the form's attributes, so I can't load the action in the form
> >>> directly
> >>> as I could with QuickForm. Is there a solution, or am I just doing
> >>> something completely wrong?
> >>
> >>
> >>
> >> Have you tried adding the hidden 'page' field with value 1 to the form?