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.

Creating a profile page where users can change meta data

  1. Hello, I have the user registration working (not with the add on, this was created just before your add on was released) and I am collecting some user meta data in the process. I am trying to figure out a way if it is possible to use the gravity forms to grab the data from the database and insert it into the correct fields. Much like the user profile already does, but I would need custom fields as well.

    So the user would go to their profile and see a form that has their password, email, organization, address, etc. Is it possible to grab that user meta data and pass it to a gravity form? If so any given direction would be greatly appreciated. Thanks

    Posted 13 years ago on Monday December 20, 2010 | Permalink
  2. Currently the User Registration Add-On only creates new users, it doesn't have editing capabilities to edit existing users.

    WordPress has built in profile editing capabilities. If a user logs in and goes to /wp-admin they should have access to view/edit their profile.

    We do plan on adding profile editing capabilities to the User Registration Add-On so it can create new users or edit existing users. However, that will not be coming until a v2 release of the Add-On.

    Posted 13 years ago on Monday December 20, 2010 | Permalink
  3. Yes I understand that the add-on only creates a new user it cannot edit them, but I was wondering if there were any hooks that I could use with regular gravity forms that would allow me to create an edit profile myself.

    I made the user registration myself using gravity forms about a week before your release with the post submission hook and some database coding. I was kicking myself afterwards because then I just saw your add-on, but it does give me confidence that I can build a profile edit area as well if given the right hooks. All I would really need to know is how to fill the gravity forms with database data if that is even possible.

    Posted 13 years ago on Monday December 20, 2010 | Permalink
  4. You could allow it to edit by writing custom code.

    You would have to:

    - Pre-Populate the User Meta field values with the actual user meta values
    - Use the Post-Submission hook to then store those values in the user meta

    You wouldn't use a form that has User Registration integration because it would create a new user. You'd have to create an Edit Form with the necessary fields and then use code to pre-populate the fields, and then use code again to store it where it needs to go post-submission.

    Posted 13 years ago on Monday December 20, 2010 | Permalink
  5. Right, I have it all mapped out logically the only issue I am having is how to populate your form with the values from the database. I know how to grab the values from there but I don't know how to populate your forms with the values I have grabbed.

    is there some hook that I need to latch onto to pre-populate as soon as the page the form is on is visited or do I do it in the backend of the form? that is the only issue I have, everything else is pretty much a cake walk. Sorry for the confusing question.

    Posted 13 years ago on Tuesday December 21, 2010 | Permalink
  6. Here is a post that discusses how to pre-populate form fields:

    http://forum.gravityhelp.com/topic/pre-populate-form-with-user-data

    You would do something similar, only the values you would return would be from the user meta table.

    The code would be placed in your themes functions.php file.

    Posted 13 years ago on Tuesday December 21, 2010 | Permalink

This topic has been resolved and has been closed to new replies.