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.

Populating a contact form with data from a previously filled form

  1. JohnB
    Member

    Hey! I've been mucking about the forums trying to learn how to do this, but I'm obviously missing something regarding query strings, hooks, or something else entirely. Here goes.

    I'm running a job board and want to set up an in-post reply form. After people add job openings, I want a form to appear below the ad that will allow users to respond to those ads. The problem is, I'm not sure how to set the response form up so that it e-mails the owner of the ad.

    Website: http://videogamejournalismjobs.com/

    Any help is greatly appreciated. Thanks!

    Posted 14 years ago on Wednesday November 9, 2011 | Permalink
  2. Sounds like you will have individual jobs as posts, and on the bottom of each post, you want to have a form embedded. Then, for that form, the form submission should go to the author of the post (job listing). Is that correct?

    You can create one form and then add the function call to your template, so the form is included on each job post. That will take care of putting the form on each job post. You might want to include the title of the post (as reference to what the submission is about) and you will need to post author's email. You can use the gform_notification_email filter to set the address where the notification will be sent.

    When you call that filter, you will use the WordPress function the_author_meta.

    There are a few pieces to make it work, but it's completely doable and will be nice and automated once it's complete.

    Posted 14 years ago on Wednesday November 9, 2011 | Permalink
  3. JohnB
    Member

    Yes, the form should go to the author of the post. Some users prefer not to register, though. Is there a way to call their e-mail address just from their ad submission form?

    This should work great for registered users, though. Might encourage people to actually sign up. Thanks!

    Posted 14 years ago on Wednesday November 9, 2011 | Permalink
  4. @JohnB If you want to dynamically populate a field on your form with the post author then you would have to write custom code to do so. Here is a tutorial on how to populate a field on your form with the post authors email address:

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

    Posted 14 years ago on Wednesday November 9, 2011 | Permalink