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

MikepFive on "[Plugin: Contact Form 7] Custom shortcode in emails"

$
0
0

Hi,

I've used Contact From 7 in several sites - and think its excellent.

I've got a particular requirement to add a 'custom' short code to the email (actually to uses IP address to track country - but that's only my particular use)

I've used the following to facilitate custom shortcodes in forms:

add_filter( 'wpcf7_form_elements', 'mycustom_wpcf7_form_elements' );

function mycustom_wpcf7_form_elements( $form ) {
$form = do_shortcode( $form );

return $form;
}

but can't find a way to do the same thing in the email template (and have resorted to editing 'special-mail-tags.php' to achieve what I need to do - but that's not very elegant or easy to maintain)

Is there a better way to use custom shortcodes in email output from Contact Form 7 ?

regards,

Mike

http://wordpress.org/extend/plugins/contact-form-7/


Viewing all articles
Browse latest Browse all 49500

Trending Articles



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