I've built a site for summer rentals of accomodations. (I'm using Toolset and beaver Builder.) It's a portal where people sign up to add their objects in a cred form. No bookings will be on the site. The guests will take contact via a contact form on the single CPT object page. I tried different ways to add the post author as the reciever of the email, but without success.
I tried to add the field connection [wpv-post-author format="meta" meta="user_email"] to the "send to" field in a Beaver Builder Contact Form Module (as well as UABB:s') and I also created a CRED form with a CPT named Contacts, but the Send notification to Author option doesn't seem to work, and neither any of the other options.
I searched your forum but I only get confused. I found something about a filter hook. Is that a way to go? Or do I need to try this with Gravity Forms or similar plugins?
Hi, let's try the following troubleshooting steps first:
- Are you using any SMTP plugins? CRED's email notification functionality is overridden by most SMTP plugins in a way that Toolset cannot control.
- Use the "test email" button to send a test email to your own address. Does the email arrive as expected?
- Temporarily deactivate all other plugins except Types, Views, CRED, and Beaver Builder. Activate a default theme like Twenty Seventeen. Test again. If the problem was resolved, reactivate your theme and other plugins one by one until the conflict is revealed.
- Can you take a screenshot of the CRED Form editor screen, so I can see the Email notification configurations?
Hi, Christian,
now I tried almost everything but nothing works. Yes, I installed a SMTP plugin. On another older Toolset site I built I needed that to get the cred email notifications to work. When I send test mail from the cred form to my private email on this new site, the plugin has to be activated to recieve the test message. On my job email it works both with and without the SMTP plugin activated.
I inactivated most of the plugins, erased all other content in the CPT single content template, even switched off BB and UABB, and activated twenty seventeen, but still without success.
One strange thing I noticed when the BB template was activated was that the shortcode [wpv-post-author format="meta" meta="user_email"] displayed the admin email address instead of the authors' when it was put AFTER the cred shortcode, [cred_form form="kontakt"]. Put BEFORE, it showed the authors', as intended. But without BB in the content template it showed everything as i should. Though, the email notification didn't work in any of the ways.
Okay and you're checking your spam folder on your private email address to be sure the test message isn't getting caught? It doesn't make sense the CRED would be able to send a message to one address but not another when SMTP is deactivated, but there could be something else going on. If you'd like, I can log in, create a clone of your site, and install it locally where I can test all the notifications with various addresses.
I'm testing a clone with the same theme and plugins active (except SMTP) and the emails are going through as expected to all the test email addresses. Can you share the email address that is not working for you? Private reply fields activated.
There's no option in the wp-admin notification to send an email to the author of the post where the form is shown, but there is an option to send a notification to an email in a generic field. So create a generic email field in the CRED form and populate it with the email address of the current post's author. Wrap it in a hidden div so it's not visible, and add the "persist" parameter like this:
<div style="display:none;">
[cred_generic_field field='currentpostauthor' type='email' class='' urlparam='']
{
"required":0,
"validate_format":0,
"default":"[wpv-post-author format='meta' meta='user_email']",
"persist":1
}
[/cred_generic_field]
</div>
Then you should be able to find the generic field "currentpostauthor" in the email notification options. If not, submit the form at least once and click the "refresh" button next to the destination select field.
Thanks Christian,
it works like a charm. Even my private email address works without smtp now. Strange.
Only downside with this method is all the Contact posts being created on your site. But I think we can live with that.
I suspect the way to add other data from the current post in the email subject line and mail body is the same. I tried it for current post author name and current post title and it seems to work. Am I right?
When loading the original Template for the current post the problem described in the last part of comment above (#741534) persists. I want the contact data for the landlord after/below the cred contact form. The user meta fields shows the right data but not the post author and post author email.
Hyresvärd: [wpv-post-author]
E-post: [wpv-post-author format="meta" meta="user_email"]
[wpv-conditional if="('[types usermeta='telefon'][/types]' ne '')"]Telefon: [types usermeta='telefon' user_is_author='true'][/types][/wpv-conditional]
[wpv-conditional if="('[types usermeta='mobil'][/types]' ne '')"]Mobil: [types usermeta='mobil' user_is_author='true'][/types][/wpv-conditional]
[wpv-conditional if="('[types usermeta='webbplats'][/types]' ne '')"]Webbplats: [types usermeta='webbplats' user_is_author='true'][/types][/wpv-conditional]
I suspect the way to add other data from the current post in the email subject line and mail body is the same. I tried it for current post author name and current post title and it seems to work. Am I right?
This approach works, or you could collect just the post ID. You can then use that value in any Types or Views shortcode to specify the post "id" attribute.
The user meta fields shows the right data but not the post author and post author email.
Please add the current page's post ID reference:
Hyresvärd: [wpv-post-author id="$current_page"]
E-post: [wpv-post-author format="meta" meta="user_email" id="$current_page"]
If this does not resolve the problem, I may need to take a closer look at how you have your BB templates and designs organized.
Works fine. Many thanks.
I'm having email notification problems with the user registration forms on the same site, so could you please keep your copy of the site and I will write another ticket for that issue.
Of course, I will hold on to the clone files for a while.