By half_brick on
I want to take an argument from the URL, ie: http://localhost/?q=node/add/retailer/12345.
And be able to use 12345 in the retailer_form_alter hook.
Can this be done?
Basically if this argument is not provided I want to display a message instead of the form?
Any help would be appreciated.
Cheers
Comments
You can use the arg() function
Using the arg() function; node is arg(0), add is arg(1), retailer is arg(2) and 12345 would be arg(3). So you can write code something like this
arg() function
http://api.drupal.org/api/4.7/function/arg
--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal