Hi Matt,
This could be accomplished using the gform_post_submission and referencing this post for populating fields from the user meta. Be aware, that this will require some basic understanding of PHP and being comfortable with some WP functions.
When the form is submitted, you would update a group of user meta fields you designate to store the submitted values from the form. This is accomplished with the gform_post_submission hook. This hook is passed all of the submitted value in the $entry object. You would match the field ID of each field with it's respective user meta field. For example, if field ID 2 is supposed to store the user's secondary email address (just an example piece of data you may be storing) you could save that value to the user meta like so:
[php]
update_user_meta($user_id, 'secondary_email', $entry[2]);
For more information on the update_user_meta function, read here.
That part covers how to save the values consistently for each user. To pre-populate any piece of user meta, refer to the post linked in the first paragraph above.
Posted 13 years ago on Sunday June 19, 2011 |
Permalink