Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Adding External Shortcodes to Email from Contact Form 7

$
0
0

Replies: 0

Hello Contact Form 7 Support Community,
I am trying to add two separate shortcodes directly into the automated email notification (email 2) that is being sent out to site visitors when they complete the contact form. One of the shortcodes will add my social media widgets and another one will create a randomized picture (both of the shortcodes have been tested and are working).

How do I go by doing this? I tried all of the following and none worked:
– putting the shortcodes directly in the body of the email
– putting <p>[shortcodes]</p> into the email
– using an old pluggin called Contact Form 7 Shortcode Enabler
– putting various code in the contact form 7 functions.php and theme’s function.phps such as add_filter( ‘wpcf7_form_elements’, ‘do_shortcode’ );

OR Such as:

add_filter( ‘wpcf7_form_elements’, ‘mycustom_wpcf7_form_elements’ );

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

return $form;
}

Thank you in advance for any and all help!!


Viewing all articles
Browse latest Browse all 59525

Trending Articles