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 8687371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:06:02+00:00 2026-06-12T23:06:02+00:00

I have created a custom module that includes a hook_submit function. Is it possible

  • 0

I have created a custom module that includes a hook_submit function. Is it possible to load another page/form at this point without having to do a redirect?

The reason being within the logic of the submit function, there are variables I would like to pass through to another page, but it consists of complex data structures (objects, arrays etc) which would not be appropriate for post/get data.

Thanks

  • 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-06-12T23:06:03+00:00Added an answer on June 12, 2026 at 11:06 pm

    hook_submit() is the tail end of the chain of form processing. Once it has completed it’s duties you have two options: redirect (either via drupal_goto() or by returning $form[“#redirect’]) to another page or do nothing, in which case the page you clicked the submit button on will be reloaded.

    You have several options for passing data on to your redirect destination, $_SESSION and the database being the most frequently used. You also have the option of setting complex data values in the Drupal.settings object in javascript, but in this instance that doesn’t buy you much if your end goal is to parse that information via PHP.

    Without specific information on what your end goal is it’s hard to provide specific advice, however assuming using $_SESSION or the database as a cache isn’t an option for you, you might consider looking into both core FAPI and ctools’ respective implementations of multi-part forms for additional guidance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a custom module for Orchard following this wonderful guide . I have
I have a module in which I created a custom page with controller and
I have created a custom module that creates a custom Database table. I have
I've created a custom module citation for academic references. Citations have, among other things,
I have created custom posts and I want one page in my site to
I have created a custom post type named People. I have created a page
I have created a custom method that will return unique items, together with the
To be more specific, I have created a custom Redis module: MyRedis MyRedis.py import
I have a auth-redirect module that is in the beginning of all my page
I have created the articles and menu items that links to that articles. This

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.