Retrieve (get) Node Number to Populate Field

echodun - July 13, 2009 - 16:55

I'm using Webform and have set up a dummy field called placeholder which is supposed to obtain the Node number of the current page (I do this so I can later sort my Webform report using this same Node number). I use the following default value in the Webform field creation screen: Type=Textfield, Default Value=%get[id].

The field only populates itself, however, when the Page is called by a menu with a Node url looking like this: /drupal//node/5?id=5

If the url merely reads drupal/node/5 the field doesn't auto populate itself. This is causing an issue with a Block Refresh module I'm using because at first the Page reads: /drupal//node/5?id=5 and my Webform Report looks great, but then on a refresh the page switches to /drupal/node/5 and I lose my report.

Anyone know how to manipulate this id thing? I don't quite understand the ?id=5 part of the url which seems to work in giving the id a value, but isn't there a global value for a current node number? Keep in mind that I can't perform any large functions to populate the placeholder field because webform only allows a one line default entry and that's where I want to pull in the node number.

 
 

Drupal is a registered trademark of Dries Buytaert.