single hook_form for many form ids

1k views Asked by At

in my module i am creating a page with many simple forms:

foreach ($parameters as $param){
  $output = drupal_get_form('mymodule_param_'.$param['id'].'_form', $product);
}
print $output;

i need to find a way to implement a single mymodule_param_form function (and the _validate , _submit ) that will apply on each $param['id'] in my $params array. i trust drupal to allow such behavior. just didnt find it yet. any help ?

1

There are 1 answers

3
chx On BEST ANSWER

You practically posted your own answer: hook_forms