Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Webform as a block. Set to show on a certain content type with a hidden field returning the token value %get[q] to let the admins know from which page the form was submitted from.

Unfortunately it has intermittent errors that I've not been able to duplicate. Is there a better way to capture the URL?

share|improve this question

What about $_SERVER['REQUEST_URI']?

share|improve this answer
using - %server[REQUEST_URI] - helped some. the hidden element now comes in with the cleanURL and not the node number but the issue remains. it keeps coming up with - (domain)/file/ajax/submitted/(field name)/form-(and what looks like long string of random characters) @beth – cuan Dec 27 '12 at 14:06
That sounds like the webform token, which all secure forms should have. What are the errors with GET['q']? – beth Dec 27 '12 at 15:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.