Drupal 7 Use Form Stored Values

Posted on 2012-08-28
Last Modified: 2012-08-28
Sorry for the question but I'm still relatively new to PHP. :)

I'm using Examples For Developers code:

to create a multi-page registration wizard.

Stored values are passed in step_information from each page. I'd like to use a couple of values from the first page to populate data on the second page. How do I extract specific items from the store_values array(i.e name)?
Question by:kjenney
    LVL 1

    Accepted Solution

    Stored values are stored in each step using the $form_state. To get the "name" entered in on the first form the code is as follows:

    $myname = $form_state['step_information']['1']['stored_values']['name'];

    Open in new window

    Any other value is easily extracted by changing the value name and/or step number (here it's 1).
    LVL 1

    Author Closing Comment

    Trial and it!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    This article is for those that are having major problems with users upload files such as pictures to their profile. The solution is simple and has to do with correcting the directory paths. With some experimenting and testing i got it fixed. Note…
    RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now