Dynamic recipient email
-
Hi, I have been trying to get this working but just can’t quite get it right.
I have an acf email field I want to use as the Contact Form 7 email recipient in the To field.
So far have set up a hidden field
[dynamichidden recipient-email “CF7_get_custom_field key=’email’ obfuscate=’on'”]
and then set the To field to
[recipient-email]I then set up my acf field to link to the form in my php page
<?php if( get_field(’email’) ): ?>
<p><i class=”far fa-envelope”></i>
<?php endif; ?>The form appears but it doesn’t validate. I get the message – There was an error trying to send your message. Please try again later.
There is a syntax error with the shortcode in Contact 7 which I know people have asked about before but I understood it was a warning and would still send ok.
What am I doing wrong.
Also, I actually want this to work from a list of posts rather than the single post – will that work?
Thanks in advance
- The topic ‘Dynamic recipient email’ is closed to new replies.