title: Can't add fields dynamically
body: <p>When I try to add a input by pressing the addextra button nothing appears. I have probably made a silly mistake somewhere but can't seem to find one.<br />
  Any help would be greatly appreciated, and thanks in advance.<br />
  HTML</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;button id=&quot;addextra&quot; name=&quot;addextra&quot;&gt; + &lt;/button&gt;
    &lt;div id=&quot;ip_div&quot;&gt;
  
    &lt;/div&gt;
    &lt;br&gt;
  &lt;/body&gt;
  &lt;script&gt;
      var fieldNum = 0; 
          $(&quot;#addextra&quot;).click(function() { 
          var newInput = $(&quot;&lt;input&gt;&lt;/input&gt;&quot;) 
              .attr(&quot;id&quot;, &quot;extra-&quot; + fieldNum) 
              .attr(&quot;name&quot;, &quot;extra-&quot; + fieldNum) 
          $(&quot;#ip_div&quot;).append(newInput); 
          fieldNum++; 
          });
  &lt;/script&gt; 
  &lt;/html&gt;
  </code></pre>
  <p>Python</p>
  <pre><code>@app.route('/add', methods=['POST', 'GET'])
  def add():
      return render_template('add.html', Name=User.Name) 
  </code></pre>