У меня есть форма A и форма B.
Я хотел бы сделать так, чтобы форма А перенаправляла пользователя в форму Б И информировала форму В о вариантах, сделанных в форме А
Функция отправки формы А (не работает):
function recruitment_select_team_submit($form, &$form_state)
{
// Forward to the next page.
$items['yourmod/foo/%/delete'] = array(
'title' => 'goto next page',
'page callback' => 'drupal_get_form',
'page arguments' => array('recruitment_form', 1), // second argument is the paramter for the team_id (test value)
//'access arguments' => array('delete foo rows'),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}
Форма B:
function recruitment_form()
{
$team_id = 1;
if(db_query('select count(*) from gm_team where id = :team_id',array(':team_id' => $team_id))->fetchfield() == 0)
{
die('Sorry but the team with team ID '.$team_id.' does not exist. If you feel this is a mistake please contact us.');
}
$team_terms = db_query('select terms from gm_team where id = :team_id',array(':team_id' => $team_id))->fetchfield();
$team_requirements = db_query('select recruit_requirements from gm_team where id = :team_id',array(':team_id' => $team_id))->fetchfield();
......
}