如何drupal_get_form()
在Drupal 7中将参数传递给?
function new_menu_callback() {
$vars = some_example_function(); // returns: array(1 => 'one', 2 => 'two');
$output = $vars[2];
$output .= drupal_render(drupal_get_form('new_form'));
}
function new_form($form, &$form_state) {
// How can I access $vars[1] from new_menu_callback() here?
}
4
有很多例子。从drupal根目录为drupal_get_form运行grep。
—
西瓦吉