[support] Simple Module Coding Question
Ivan Sergio Borgonovo
mail at webthatworks.it
Wed Jul 30 18:40:38 UTC 2008
On Wed, 30 Jul 2008 11:07:43 -0700
"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 makes your form definition function dependent on where it is
rendered.
What about
...
'path' => 'somepath/'.arg(1).'/'.arg(2),
'callback' => 'drupal_get_form',
'callback arguments' => Array('my_form',arg(1), arg(2)),
...
function my_form($p1, $p2, $form_values) {
$form['bau']=array(...);
}
I just had issues with multistep forms making use of $form_values
when I was willing to provide a fall back from somepath/1/2 to
somepath/ without duplicating too much code.
I solved it in a way that I didn't find intuitive but I forgot how I
did.
But in less complicated situation it definitively works smoothly in
D5.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
More information about the support
mailing list