title: jQuery - insert value into <input value="">
body: <p>I have the following script that dynamically builds text fields with a value from other input element.
  The value is displayed on the screen but it doesn't get inserted into <code>value=""</code> as inspected in the dev tool. I need the value to be inserted as <code>value=""</code> so that the form data can be persisted.</p>
  
  <pre><code>$(document).on('click', 'button', function(event) {
    $("fieldset").append($('&lt;input&gt;').prop('type', 'text').val($('#entry').val()));
  });
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/uf370.png" alt="See my image"></p>