title: Adding jinja2 template code to javascript innerHTML
body: <p>I am trying to get javascript to insert a flask-wtf form into a div as such.</p>
  <pre><code>var element = 'content'
  var addElement = `{{ form.${element}(class=&quot;&quot;) }}`
  
  var newDiv = document.createElement(&quot;div&quot;);
  newDiv.innerHTML = addElement;
  </code></pre>
  <p>Javascript displays my <em>addElement</em> as a string on my website instead of interpreting it to a form. I suspect this is because of the jinja2 syntax in there. How do i get it to display as a form?</p>