Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6873629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:05:34+00:00 2026-05-27T04:05:34+00:00

I have a form A and a form B. I would like to make

  • 0

I have a form A and a form B.

I would like to make form A redirect the user to form B AND inform form B of the choices made in form A

Form A’s submit function (does not work):

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;
}

Form B’s form:

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();  

......
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:05:34+00:00Added an answer on May 27, 2026 at 4:05 am

    Hanito’s link to multiform example in the comments to your question would be my first recommendation… however if you really need form B to be a separate form or that’s beyond your control, you could probably just store the form values of form A in a session var, and then set the $form[‘redirect’] value to the path of form b.

    example.

    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,
        );
    
        $_SESSION['form_a_values'] = $form_state['values'];
        $form['redirect'] = 'path/to/form/B';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which includes a data sheet. I would like to make
I would like to have a form that can submit to two different action
I would like to make a form I have in my website self referencing.
I have a form that I would like to make printer friendly in a
I have a form that I would like to submit to a component for
I have a page with a form on it. I would like to make
I have a form that I would like to style. specifcally I would like
I would like to have Ajax form in Rails so i'm using form_remote_tag. The
I have a form that edits an instance of my model. I would like
I have an ASP.Net form and i would like to save it into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.