Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How to use other shortcodes inside Contact form 7- forms? indeed explains how to use other shortcodes inside Contact Form 7 forms. But that doesn't make them usable in the mails that Contact Form 7 sends on submission of the form. How do I make them work there too?

share|improve this question

put on hold as off-topic by Mark Kaplun, Johannes Pille, mrwweb, Pieter Goosen, birgire 2 days ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Mark Kaplun, Johannes Pille, mrwweb, Pieter Goosen, birgire
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

WPCF7 incorporates more filters than used in the answer you already found.

Analogously to that, the wpcf7_posted_data filter should do what you are looking for:

function wpse73667_wpcf7_posted_data( $posted_data )
{
    $posted_data = do_shortcode( $posted_data );
    return $posted_data;
}
add_filter( 'wpcf7_posted_data', 'wpse73667_wpcf7_posted_data' );

Note that this is an educated guess and untested.

You can find all the filters available by searching the %plugins_directory%/contact-form-7/includes/classes.php file for the term apply_filters.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.