Quantcast
Channel: WordPress.org Forums » [Contact Form 7] Support
Viewing all articles
Browse latest Browse all 49500

kryvulena on "[Plugin: Contact Form 7] Dynamic email address in php shortcode?"

$
0
0

Hi

Thanks for your quick reply. However this is not what I'm looking for, maybe I phrased my question incorrectly.

Lest's say I have 1 CPT template for 200 clients with a php Contact Form 7 php short code used and they display their data individually on 200 dynamic pages. Each client submits his email address via CPT WP admin section and now each address should be used dynamically in the Contact Form php shortcode in the template - so that each user's email address is inserted dynamically depending on a page called creating a correctly configured Contact Form for each client.
I can't use [_post_author_email] since clients aren't authors of the CPT - there's a need to use something like (excuse my lameness hi hi):

<?php echo do_shortcode( '[contact-form-7 <?php echo(render_field("email", array(""))); ?>' ); ?>

where

<?php echo(render_field("email", array(""))); ?>

is a php code used from the Types CPT plugin http://wordpress.org/support/plugin/types to create CPT templates with dynamic content (it's already set up and working in my template - I can display clients' emails but can't insert them into contact forms).


Viewing all articles
Browse latest Browse all 49500

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>