开发者

single hook_form for many form ids

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 functio开发者_开发知识库n (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 ?


You practically posted your own answer: hook_forms

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜