I already read other post where they were asking the same:

ACF + contact form 7

I must say that the solution didn't work for me. The contact-form keeps sending the emails to the email address set on Contact Form 7 configuration.

This is what i put on my single.php file:

<?php echo do_shortcode( '[contact-form-7 id="5" title="Form World Unite" destination-email="'.get_field( 'email' ).'"]' ); ?>

What could be wrong?

  • From a quick skip of the plugin code it might be recipient= not destination-email=. Or maybe mail=. But I'm not sure sorry. – Rup May 2 at 13:05
  • Why don't you create a second form in the backend with a different recipient? Put the second shortcode in your template - done. – user3135691 May 2 at 14:12
  • The idea is having a different contact form for every author who logs in and create a post. So i can't do that. – Draws Ren Gundam May 3 at 3:55
  • I haven't seen anything in the plugin code (Contact Form 7) that allows to set the recipient in the shortcode itself. What I would do instead is to hook the data when the form is sent and change the recipient on the fly based on the currently logged in user. – Mike May 3 at 6:38
  • I found another solution, just use the Contact Form 7 Custom Recipient plugin.With this plugin i can change the recipient everytime i create a post, that works for the moment. – Draws Ren Gundam May 3 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.