I'm attempting to redirect to a page with a question mark in the URL so that I can track submissions in Google Analytics. A form submission would ideally redirect to http://example.com/application-completed?abc123 (abc123 being a replacement token taken from a hidden field in the form, an ID if you like).

The issue I've got is that the question mark causes the URL to cut off at that point, so the above example simply redirects to http://example.com/application-completed. If I replace the ? with a /, the redirect works so I know the replacement token is correct. The reason I need to use the ? is that I have created an 'application-completed' page that uses a custom template so going to application-completed/abc123 gives me a 404.

I'm guessing it is something to do with valid_url? Any help would be much appreciated. I'm a front end dev with little knowledge of altering Drupal beyond the standard backend so please forgive me if the question seems basic.

Comments

GuerillaRadio created an issue. See original summary.

GuerillaRadio’s picture

Issue summary: View changes
Liam Morland’s picture

Are you referring to setting the "Redirection location" on the Form settings page? It works for me. Note that it should be in the form ?key=value; there should be an equals sign in there.

Liam Morland’s picture

Status: Active » Fixed

Please re-open if you need more help.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.