title: Clone section of form & retain values on error (PHP & jQuery)
body: <p>I'm editing a portion of a job application form where the applicant can add multiple "previous employer" values. There are several fields in this portion that I need to clone and retain the values for upon submission. The cloned fields should stay populated if there are submission errors.</p>
  
  <p>The site already uses jQuery and is using PHP &amp; Pear to handle the form submission and validation.</p>
  
  <pre><code>&lt;h3&gt;Previous Employer&lt;/h3&gt;              
  &lt;ul&gt;
      &lt;li&gt;                
        &lt;span&gt;Date of Hire&lt;/span&gt;
          &lt;input type="text" name="field41" value="&lt;? echo $_POST['field41']; ?&gt;" class="sm requiredField"&gt; 
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;End Date &lt;/span&gt;
          &lt;input type="text" name="field42" value="&lt;? echo $_POST['field42']; ?&gt;" class="sml requiredField"&gt; 
      &lt;/li&gt;
  &lt;/ul&gt;
  &lt;ul&gt;
      &lt;li&gt;
        &lt;span&gt;Name of Employer &lt;/span&gt;
          &lt;input type="text" name="field43" value="&lt;? echo $_POST['field43']; ?&gt;" class="sm requiredField"&gt; 
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;Address &lt;/span&gt;
          &lt;input type="text" name="field44" value="&lt;? echo $_POST['field44']; ?&gt;" class="sml requiredField"&gt; 
      &lt;/li&gt;
  &lt;/ul&gt;
  &lt;ul class="last" id="emp"&gt;
      &lt;li&gt;
        &lt;span&gt;&lt;a href="#emptop" class="add_emp_field"&gt;Add Another Position&lt;/a&gt;&lt;/span&gt;  
      &lt;/li&gt;
  &lt;/ul&gt;
  ...
  </code></pre>
  
  <p>What's the best way to handle the cloning of that chunk of fields + how can I retain their values so that the fields aren't emptied when there's an error? Additionally, how can I retain the value from a <code>&lt;select&gt;</code>field upon submission with errors?</p>