PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How to pass user Meta data to Pre-Populate Reservation form

  1. echristoperj
    Member

    Ok, I'm having a tough time making the final connection with pre-populating of a reservation form ( http://www.pairadicetravel.com/reservations/ ). This is what I have so far.

    1. Using Gravity Forms User Registration Add-On to replace default wordpress register function. (works great)

    2. Created a register form that gets the info that I want to populate in another form. (http://www.pairadicetravel.com/contact-us/) Works fine.

    3. In the reservation form, I've added all the parameter names to the fields that will be pre-populated. Those names match the names of the same fields from User Meta.

    https://www.evernote.com/shard/s1/sh/caaccf36-d325-4d25-ab94-cfc598c4a631/6e81d1d1cfc8fada52080047aa58c58e/deep/0/Screenshot%202/19/13%209:55%20AM.jpg
    https://www.evernote.com/shard/s1/sh/52c1f0b6-8037-4550-a9f2-f8e678757a71/0c325ad929b4e4a0581c93f7e60ffeb8/deep/0/Screenshot%202/19/13%209:54%20AM.jpg

    What I want to happen is once the user registers and provides the needed information about their room preferences, it's stored on their profile. It's currently doing this step. Next once that user logs into the site to make a reservation that meta information is populated into the form. I've tried going through the help pages, but get lost on the parameter names. Can this be done by shortcode?

    Thanks.

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  2. To add a default value to a field which is available in the logged in user's profile, you can use a merge tag like this (from your screenshots):

    {user:airport}
    {user:game}
    {user:smoking}
    {user:room}
    {user:special}
    {user:dob}
    etc.

    Use that format merge tag for the "Default Value" on the advanced tab for your field, and the value should be populated when the user is logged in and attempts to access your form.

    Posted 11 years ago on Friday February 22, 2013 | Permalink
  3. echristoperj
    Member

    Thanks for that help. That worked, but not on Drop Down items or items like the Address and full name. How do I set the default value for those?

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  4. For fields where you cannot set a default value, you could use dynamic population to fill in the value.

    http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population

    Posted 11 years ago on Wednesday February 27, 2013 | Permalink
  5. echristoperj
    Member

    Following the instructions for short code version would i just use this:

    [gravityform id=3 name=UntitledForm title=false ajax=true field_values='prefix={user:prefix}&first={user:first}&last={user:last}&suffix={user:suffix}']

    to pull the values from the signed in user profile?

    Posted 11 years ago on Wednesday February 27, 2013 | Permalink
  6. No, the merge tags are not processed in the shortcode like that. Seems like a catch 22. Let me ask the development team about this one to see how you can pre-populate those additional fields.

    Posted 11 years ago on Thursday February 28, 2013 | Permalink
  7. echristoperj
    Member

    Hello. Can you provide me on instructions on how to proceed? Thanks.

    Posted 11 years ago on Thursday March 14, 2013 | Permalink