2

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?

2 Answers 2

0

What about $_SERVER['REQUEST_URI']?

2
  • 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
    Commented Dec 27, 2012 at 14:06
  • That sounds like the webform token, which all secure forms should have. What are the errors with GET['q']?
    – beth
    Commented Dec 27, 2012 at 15:23
0

What about Drupal official way? https://api.drupal.org/api/drupal/includes!path.inc/function/current_path/7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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