2
我正在處理多個表單常見的模塊。我需要將$ form_id作爲參數傳遞給提交處理程序,並在提交函數中相應地設置表單值。如何將參數傳遞給Drupal中的表單提交處理程序
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?
謝謝!
我已經發現,form_id已經在所有領域的隱藏字段的任何其他領域。 ... – 2012-02-25 13:34:50