Is it possible to customise the recipient email from the short code?
-
Here’s what I am trying to do…
On my post pages I want to have a link to contact the author of the post. The URL would be something like
example.com/contact?authorid=1
i.e. the URL of my general contact page, with an authorid passed as a GET parameter.
Then, within my contact page I want to look up from the Users table what that author’s email address is (I know how I’ll do this), and pass it somehow to Contact Form 7 to override it’s normal destination email. What I’d like to do is include something in the shortcode that gets picked up in the innards of CF7 like this:
[contact-form-7 id=”99″ title=”Contact form 1″ email=”[email protected]”]
I realise this functionality isn’t available out of the box, but does anyone have any suggestions how I might achieve it? It needs to be done in such a way that the email addresses are not exposed in the html.
Plan B will be to set up contact forms for each author, and then to pick the shortcode accordingly, but I’d rather not have the hassle and it would be nice to have authors emails only stored in one place.
- The topic ‘Is it possible to customise the recipient email from the short code?’ is closed to new replies.