[support] Simple Module Coding Question

Metzler, David metzlerd at evergreen.edu
Wed Jul 30 18:25:30 UTC 2008


Er, but that doesn't work in drupal 5 or later, does it?  

I had to do some significant reworking of forms that were built that way
when I updated to D5. 

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Greg Knaddison - GVS
Sent: Wednesday, July 30, 2008 11:19 AM
To: support at drupal.org
Subject: Re: [support] Simple Module Coding Question

On Wed, Jul 30, 2008 at 12:07 PM, Metzler, David
<metzlerd at evergreen.edu> wrote:
> I usually just get it using a call to arg(1) in the from rendering 
> function.
>
> Make sense?
>

This works as long as your form is always on that exact URL.  An
alternative, if you want your form to be more flexible, is to use
arg(1) as a 'page argument' in the hook_menu definition and then add it
as a variable in your custommod_form_name($var_here) function
declaration.


--
Greg Knaddison
Denver, CO | http://knaddison.com | 303-800-5623 Growing Venture
Solutions, LLC | http://growingventuresolutions.com
--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list