title: Dynamically Populate Gravity Form Field with Page Title
body: <p>I am trying to fill in a Gravity Form field dynamically with the current page title. I should be able to do this with populate dynamically option. I am using a shortcode:</p>
  
  <pre><code>&lt;?php
    $product_name = the_title();
  ?&gt;
  &lt;?php echo do_shortcode( '[gravityform id="2" name="BCMac.com Product PDF Download" field_values="product_name='.$product_name.'" title="false" description="false" ajax="true" ]' ); ?&gt;
  </code></pre>
  
  <p>When I use a static value in the shortcode, it works great. Whenever I try to output the title via the variable, it outputs it above the form and not in the field. Any idea what I am doing wrong?</p>