Closed (fixed)
Project:
Webform
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2007 at 23:58 UTC
Updated:
14 Oct 2008 at 09:15 UTC
I'm using %server[HTTP_REFERER] to try and attempt to get the referring page into the form (for a simple "Contact our Editor" type thing), but am finding that it will only capture Drupal pages that way; in this scenario, I'd like it to capture any referring page into the form. Any thoughts on why this isn't working as expected, or would there be another way to accomplish this using the Advanced Options on the Webform?
Comments
Comment #1
phillipadsmith commentedSorry, had a typo in there. Works a-ok. :-)
Comment #2
phillipadsmith commentedActually, upon further investigation, I am having an issue here. Basically, here's what I've done:
* I've created a textfield for the referring page and have selected the disabled option
* In that field, I've put (as suggested) the %server[HTTP_REFERER] to get the referring page
So, when the user arrives at the form, the referring page is pre-populated and is not editable. This all works great.
The problem arrises when the form is submitted. The data that is submitted shows the actual form as the referrer vs. the referring page. Though this may (for some reason?) be technically correct, I don't think it makes sense given that the field is disabled, e.g., if the user can't adjust the value, why should the form be able to?
Phillip.
Comment #3
gvdvenis commentedI Agree, on submission the parameter should not be processed again, but instead use the generated value out of the textfield.
This problem also occurs when using a hidden field for this. However, when you set the textfield to enabled, it does work!
Comment #4
phillipadsmith commentedCrazy -- I'll give that a try as a stop-gap measure. Hopefully this is a bug worth fixing! :-)
Comment #5
quicksketchComment #6
ar4 commentedso, in what version of Webform this bug is fixed?
in 1.8 %server[HTTP_REFERER] still shows actual form
Comment #7
dries arnoldsI'm still having this issue in 6.x-2.2, so I updated the version accordingly.
I'd really like to be able to get this to work. I tested it with hidden and disabled fields, but both name the 'thank you'-page as the referrer.
Comment #8
dries arnoldsI'm sorry for bumping this up. After some more searching I read this has to do with caching issues and is indeed not a bug.