title: Save html form layout and values with jQuery
body: <p>I'm trying to save form layout including full html as well as checkbox status and field entered values. This is the sample form:</p>
  
  <pre><code>&lt;div id="formRaw"&gt;
    &lt;div class="block-group"&gt;
      &lt;label class="checkbox"&gt;
        &lt;input value="Internet Explorer" name="checkd[]" type="checkbox"&gt;
        Internet Explorer&lt;/label&gt;
      &lt;label class="checkbox"&gt;
        &lt;input value="Firefox" name="checkd[]" type="checkbox"&gt;
        Firefox&lt;/label&gt;
      &lt;label class="checkbox"&gt;
        &lt;input value="Chrome" name="checkd[]" type="checkbox"&gt;
        Chrome&lt;/label&gt;
    &lt;/div&gt;
    &lt;div class="block-group"&gt;
      &lt;input name="fullname" type="text"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is js part:</p>
  
  <pre><code> $(document).ready(function() {
       $('body').on('click', 'button[name=dotemp]', function() {
           $.ajax({
               type: "post",
               url: "process.php",
               dataType: 'json',
               data: {
                   htmlcode: $("#formRaw").html()
               },
               success: function(json) {
               }
           });
       });
   })
  </code></pre>
  
  <p>I want to be able to capture checkbox status as well as entered value of input box. Everything is working fine, but no matter what if I select on or more checkboxes or enter value in fullname filed, it does not get captured.</p>
  
  <p>The preferred result should be something like:</p>
  
  <pre><code>&lt;div id="formRaw"&gt;
    &lt;div class="block-group"&gt;
      &lt;label class="checkbox"&gt;
        &lt;input value="Internet Explorer" name="checkd[]" type="checkbox"&gt;
        Internet Explorer&lt;/label&gt;
      &lt;label class="checkbox"&gt;
        &lt;input value="Firefox" name="checkd[]" type="checkbox" checked="checked"&gt;
        Firefox&lt;/label&gt;
      &lt;label class="checkbox"&gt;
        &lt;input value="Chrome" name="checkd[]" type="checkbox" checked="checked"&gt;
        Chrome&lt;/label&gt;
    &lt;/div&gt;
    &lt;div class="block-group"&gt;
      &lt;input name="fullname" type="text" value="My Name"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>