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.

pre populate fields using hooks and user registration

  1. obvio
    Member

    Hi,

    First: great work, its the best piece of software I ever bought in my life, thanks for that!

    I'm trying to put into use the user reg. add-on and while being able to use the form for registratating I would also like to use another form letting the user edit his own details (don't want them to go to wp-admin..). So I managed to use the gform_pre_render_ID and get/edit/return the form with the already saved used details but my questions are as follow:

    1. is there a better/shorter way? something i'm missing to take the user to the registration form with all his details pre-populated and just save it there?

    case not:
    2. should I overwrite in the fields array "content" AND "defaultValue" or only is enough/efficient, case so which?
    3. is there some convenience static function to edit those fields? something like overwrite(fieldID,newValue)?

    Thats it.. thanks again!

    Posted 8 years ago on Tuesday February 22, 2011 | Permalink
    • 1 - Here is another way to populate user meta into a field: http://www.gravityhelp.com/forums/topic/right-parameter-names-to-pre-populate-the-names-fields#post-16420

      If you are already comfortable with code, using the gform_pre_render hook may be the faster way to complete this. There is no pre-built function that does this currently.

    • 2 - You should only need to update the defaultValue property.
    • 3 - There is no pre-built function for this either. Though if you take a look at the code provided for item 1, the filter used there might replace your need for such a function.
    • Let me know if you have any more questions on this. :)

    Posted 8 years ago on Tuesday February 22, 2011 | Permalink
  2. obvio
    Member

    thanks!

    Posted 8 years ago on Tuesday February 22, 2011 | Permalink

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