Contact Form 7
Why doesn't it support the embedding of other shortcodes? (1 post)

  1. kimipooh
    Posted 4 years ago #

    Sometimes, I'd like to use other shortcodes into this contact form.
    Especially, I'd like to use the shortcode of Table Plugin like "WP-Table Reloaded".
    In this case, I embed the reserved keyword of contact form into Table of "WP-Table Reloaded". Then, I embed "[table id=number /]" to the contact form.
    By this setting, I will be able to use comfortable table format in the contact form.

    I worked out this issue by adding 1 line in "shortcodes.php" file.
    But I don't know whether this is right way or not.
    If the other trouble happens due to this change, please tell me.

    My additional PHP code is "// *** Added ****" line in the following file.

    - contact-form-7/includes/shortcodes.php

    function do_shortcode( $content, $exec = true ) {
    		$this->exec = (bool) $exec;
    		$this->scanned_tags = array();
    		$content = do_shortcode($content); // *** Added **
    		if ( empty( $this->shortcode_tags ) || ! is_array( $this->shortcode_tags ) )


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic