【发布时间】:2012-02-23 10:59:14
【问题描述】:
我正在开发一个适用于多种表单的模块。我需要将 $form_id 作为参数传递给提交处理程序,并在提交函数中相应地设置表单值。
function ppi_form_alter(&$form, &$form_state, $form_id){
$form['#submit'][]="action_form_submit";
}
function action_form_submit($form, &$form_state) {
//here I need to get the form_id of the form and form_set_value accordingly ... How can I know the form value?
}
有没有办法知道form_submit中的form_id?
谢谢!
【问题讨论】:
标签: drupal drupal-7 drupal-modules drupal-hooks drupal-forms