[development] possible bug in FAPI 5.6 (query string killed)

Ivan Sergio Borgonovo mail at webthatworks.it
Mon Jan 14 18:01:49 UTC 2008


On Mon, 14 Jan 2008 09:37:19 -0800
"Florian Loretan" <floretan at gmail.com> wrote:

> If the only thing you want to do is redirect the user after form
> submission, just set the #redirect property of the form.
> 
> $form['#redirect'] = 'my/custom/path';

> Alternatively, you could call your form with a parameter:

> http://example.com/my/form?destination=my/custom/path

$_GET stuff get encoded or trimmed.
No matter if I put it into the #action, #redirect or "hardcode" it
into the return of _submit.

My interest in $_GET in spite of hooks is I've a bunch of parameters
that are common to forms and are useful in the final form landing
page.
If they were "positional" I'd have to extract them in different ways
accordingly to the length of the path in the menu hook.

So similar form may redirect to
/bla/bli/blu?id=37
/bim/bum?id=37
/bau?id=37

and there is a part of common code that will pick up the id and build
up some content.

But no matter how I try to pass an additional query param through the
FAPI it gets mangled or chopped.

It get chopped/mangled just after the _submit hook.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the development mailing list