Where "25" is the node number. This token does the job I wanted but the instructions say that the argument just returns "0123" (the node number) but I get "node,0123"

This might or might not be a bug. Not sure, since I am new to Drupal.

But I really wanted to thank you for SUCH AN AMAZING MODULE!! So glad that I can finally integrate the Profile2 tokens in webforms. I will wait until you fix the same page conditionals, but in the meanwhile, thank you so much!

Thanks,
PJ

Comments

quicksketch’s picture

Category: bug » support

The contents of the tokens are outside the control of Webform (other than the [submission:*] tokens). The Token module provides [current-page:url:args]. As far as I can tell, the comma-separate value of "node,0123" looks like it's the intended functionality described in the code, but maybe the description in the Token help is incorrect. I *think* you can use [current-page:url:args:value:1] to get the NID out of the URL, but I'm not sure. As a different approach, this issue looks like it might help in your situation, but it's not completed: #919760: Add a [current-page:object:?] dynamic token.

quicksketch’s picture

Other candidates:

[current-page:url:unaliased:args:value:1]
[current-page:arg:1]

The second one looks easiest but is described as being deprecated and probably won't work forever.

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity.