title: Fill Contact Form 7 Field Dynamically Based on Loop Click/Post Title
body: <p>I have page that displays a custom post type (products) loop, where I placed a form at the bottom. The loops is simple (post title, content, button), my goal is to fill the "Subject" contact form 7 field with the post title (within the loop), when someone clicks on the button (Request Quote) on any of the post in the loop. Example: If I have 3 products in the loop (Product 1, Product 2 and Product 3), if someone clicks on "Request Quote" on "Product 2", then then subject is filled with "Product 2".</p>
  
  <p>I installed "Contact Form 7 Dynamic Text Extension" and below is what ,my code looks like:</p>
  
  <p><strong>Contact Form 7 Dynamic Field</strong></p>
  
  <p>Should I use this <code>[dynamictext product-quote "CF7_POST key='products-title'"]</code></p>
  
  <p>or this <code>[dynamictext product-quote "CF7_get_post_var key='product-title'"]</code></p>
  
  <p><strong>This is what my post loop shortcode looks like</strong></p>
  
  <pre><code>//Display products Feed
  function products_function() {
    global $post;
  
      $html = "";
  
      $my_query = new WP_Query( array(
          'post_type'         =&gt; 'product',
          'posts_per_page'    =&gt; -1 ,
          'orderby'           =&gt; 'menu_order',
          'order'             =&gt; 'ASC',
      ));
  
      $post_id = get_the_ID() ;
  
      if( $my_query-&gt;have_posts() ) : while( $my_query-&gt;have_posts() ) : $my_query-&gt;the_post();
  
      //Add tags as class for single or multiple tags.
      $post_tags = get_the_tags(); 
      $class = array();
      for($i=0; $i &lt; count($post_tags); $i++){
          $class[] = $post_tags[$i]-&gt;name; 
      } 
      $classfinal = implode(' ',$class);
  
          $html .= "&lt;div class='product_entry ". $classfinal ."'&gt;";
          $html .= "&lt;div class='product_image'&gt;".get_the_post_thumbnail() ."&lt;/div&gt;";
          $html .= "&lt;h4 class='product_title'&gt;&lt;span&gt;". get_the_title() ."&lt;/span&gt;&lt;/h4&gt;";
          $html .= "&lt;p class='product_description'&gt;" .get_the_content()."&lt;/p&gt;";
          $html .= "&lt;a class='product_button et_pb_button' href='#get-product'&gt;Request Quote&lt;/a&gt;";
          $html .= "&lt;/div&gt;";
         endwhile;
       wp_reset_postdata();
   endif;
  
      return $html;
  }
  
  function register_shortcodes(){
      add_shortcode('products', 'products_function');
  }
  add_action( 'init', 'register_shortcodes');
  </code></pre>
  
  <p>I am guessing I need to create some kind of variable, which will be the post title of the post when that button is clicked, in addition with some kind of javascript to accomplish that. I am just stuck at this point, not sure how to proceed from here. Any help will be very appreciate it. Thank you!</p>