title: PHP echo statement within getElementByID div tag
body: <p>I've currently got a form which i use from Gravity forms, here is my html code</p>
  
  <pre><code>    &lt;div class="dropdown"&gt;
      &lt;button onclick="myFunction()" class="dropbtn"&gt;SPECIFY PRODUCT&lt;/button&gt;
      &lt;div id="myDropdown_&lt;?php echo get_the_ID(); ?&gt;" class="dropdown-content"&gt;
      &lt;?php gravity_form( 1, false, false, false, '', true ); ?&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>as you can see i'm echoing the product ID from woocommerce to give a different  div id dependent on which product the user clicks on. This works fine.</p>
  
  <p>Although, now when i create javascript function : </p>
  
  <pre><code>    function myFunction() {
      document.getElementById("myDropdown_&lt;?php echo get_the_ID(); ?&gt;").classList.toggle("show");
      }
  </code></pre>
  
  <p>how can I pull through 'get_the_ID' like i have in the html code so it can dropdown my form in accordance to the product selected?</p>
  
  <p>You can take a look at it here : <a href="http://www.ctagroup.com.au/cta-group-home/products/tactile-guidance/suresteel/suresteel-classic/" rel="nofollow">http://www.ctagroup.com.au/cta-group-home/products/tactile-guidance/suresteel/suresteel-classic/</a></p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Regards</p>