@pjeaje I emailed this information to you as well.
You have a few more issues than I can help you with in email. I can pinpoint a couple problems though.
1. You need to upgrade Gravity Forms. There was a bug in 1.6.2 which failed to correctly populate the usermeta information (like post author and post name). That might be the major source of your problem. None of the code would work without those merge tags populating correctly. After you upgrade, the user meta values (post author and email) will be populated correctly. Sorry about that bug, but it's fixed now.
2. Your form is completely wrong. Very simply, it needs to be a contact form. So the visitor will fill in some amount of information you want to get. Get that configured first. Maybe it's just name, email, comments, maybe a phone number. That is what they will enter. DO NOT use the "Post" fields as you have done with the "Contact this business" form. That is wrong. The post fields are for CREATING posts on submission. You're not doing that.
3. Then, be sure to set the Default Value on the Advanced tab. Use the drop down to insert this merge tag:
{embed_post:post_title}
That will ensure the contact form, when it's submitted, will have a record of the post title where the form was submitted from (so you know what business the inquiry is about.) I also made it "admin only" so it does not show to the user. They don't need to see it. But the submission will come to you with the information recorded properly in the entry.
4. Once you have that all working in the form builder, we can go about adding another field to hold the post author's email, and then using that for the notification.
I started a form for you called (GF) Contact Business and stuck that into a widget in the sidebar, so this should be working. You will need to get and configure the Widget Logic plugin to use the form on is_single() pages only. http://wordpress.org/extend/plugins/widget-logic/
This part should be just about done. You can reconfigure or edit the form or create another one just like it. But this should get you on the right track with the easy stuff, and once that's done, we will work on functions.php and populating the author email address.
Let me know when this part is working and then we will work on the rest. Thank you.
Posted 12 years ago on Wednesday February 8, 2012 |
Permalink