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.

Dynamic Population and User Profiles

  1. kelvin.quarles@ikvinc.com
    Member

    Issue: I currently have three forms set up, each of them are a step-system type of form, meaning there are multiple steps to complete a form submission. It's broken up as such:

    General Information
    Form Specific Information

    What I would like is to make it when the user fills out the General Information section, it creates a user account for that particular user (I have this set up already). However, when the user goes to another form, I would like the data previously filled out on the previous form copied to the new form.

    The problem I currently have with this is that in the general information section, I ask for things such as Address and Phone Number, which aren't a part of a "User Profile" within WordPress, is there any way to copy this information?

    OR if I could edit the Wordpress User Profiles, I could set it up where the user must first register with the website and then only fill out the specific form information. Again, this would require being able to store extra information in the wordpress User Profile. How can I accomplish this?

    Posted 12 years ago on Tuesday April 10, 2012 | Permalink
  2. This post here sounds like it might help out, or be a step in the right direction:

    http://www.gravityhelp.com/forums/topic/user-meta-for-auto-fill-form-and-user-profile#post-45969

    Posted 12 years ago on Tuesday April 10, 2012 | Permalink
  3. kelvin.quarles@ikvinc.com
    Member

    Ok thanks I'll take a look

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  4. kelvin.quarles@ikvinc.com
    Member

    Okay,

    I have set up all the user meta data and that works properly. However, when I go to my form on the webpage, for some reason I get the author's information displayed in the form as opposed to the user who is logged in. I'm assuming it has something to do with the dynamic population hook I've created...This is what I have

    add_filter('gform_field_value_user_email', 'populate_user_email');
    function populate_user_email($user){

    $user_email = get_the_author_meta('email', $user->ID);

    return $user_email;
    }

    However, as I said this returns the email address of the Author of the post, not the User logged in...

    What do I have wrong?

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  5. kelvin.quarles@ikvinc.com
    Member

    http://www.pastie.org/3772961

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  6. Looks like you are calling out for the author meta:

    $user_email = get_the_author_meta('email', $user->ID);

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  7. kelvin.quarles@ikvinc.com
    Member

    What would be the proper syntax to retrieve the users information?

    Posted 12 years ago on Friday April 13, 2012 | Permalink