title: Reset all Formdata on click of a button
body: <p><strong>my Reset Button code is</strong> </p>
  
  <pre><code>&lt;div class="span6 pagination-right"&gt;
              &lt;input id="clearData" type="button" class="btn"  data-add-person-manually-reset="#"
                  value=&lt;spring:message code="common.reset" /&gt;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
              &lt;input type="button" class="btn"
                  data-add-manually="/recipient/person/add"
                  value=&lt;spring:message code="common.add" /&gt;&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>I want to clear the the following  fields using jQuery to reset the div id Clear1 and Clear 2 
  fields to clear on call of Reset are
          <strong>From div id Clear1</strong></p>
  
  <ol>
  <li><p>firstName 
  lastname        organizations       positions</p>
  
  <pre><code>**From div id Clear2**
  codeval1
  codeval2
  codeval3
  codeval4
  codeval5
  addressList5.type
  </code></pre>
  
  <p>
                  
                      
                  
                  
                      
                  
                  
                      
                  
                  
                      
                  
                  </p>
  
  <pre><code>            &lt;div class="row-fluid" id="addToGroup"&gt;
                                  &lt;div
                                      class="row-fluid form-inline control-group&lt;c:if test='${empty groups}'&gt; hidden&lt;/c:if&gt;"
                                      id="addToGroupForm"&gt;
                                      &lt;label class="control-label"&gt;Add to Group:&amp;nbsp;&lt;/label&gt;
                                      &lt;div class="controls" id="showGroups"&gt;
                                          &lt;div class="span9"&gt;
                                              &lt;select class="span9" id="addGroupId"&gt;
                                              &lt;option value="0" disabled selected&gt;&lt;spring:message code="group.select"/&gt;&lt;/option&gt;
                                                  &lt;c:forEach var="group" items="${groups}"&gt;
                                                      &lt;option value="${group.id}"&gt;${group.name}&lt;/option&gt;
                                                  &lt;/c:forEach&gt;
                                              &lt;/select&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                                  &lt;div id="added" class="control-group"&gt;
                                  &lt;label class="control-label &lt;c:if test='${empty personForm.groupList}'&gt;hidden&lt;/c:if&gt;"&gt;Added to Group&lt;/label&gt;
                                  &lt;div class="controls"&gt;
                                      &lt;c:forEach var="group" varStatus="status"
                                          items="${personForm.groupList}"&gt;
                                          &lt;div class="row-fluid form-inline"
                                              data-add-info='{"id": "${group.id}", "name": "${group.name}"}'&gt;
                                              &lt;div class="span3"&gt;
                                                  &lt;input type="hidden" name="groupList[${status.index}]"
                                                      value="${group.id}" /&gt;
                                                  &lt;button class="btn" type="button"&gt;&lt;i class="icon-remove icon-16"&gt;&lt;/i&gt;&lt;/button&gt;
                                              &lt;/div&gt;
                                              &lt;div class="span5"&gt;${group.name}&lt;/div&gt;
  
                                          &lt;/div&gt;
  
                                      &lt;/c:forEach&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;br/&gt;
                              &lt;br/&gt;
                              &lt;br/&gt;
                      &lt;h:field path="owner" code="organization.owner" required="true"&gt;
                          &lt;c:choose&gt;
                              &lt;c:when test="${empty personForm.id}"&gt;
                                  &lt;form:select path="owner"&gt;
                                      &lt;form:options items="${departments}" itemLabel="name"
                                          itemValue="id" /&gt;
                                  &lt;/form:select&gt;
                              &lt;/c:when&gt;
                              &lt;c:otherwise&gt;
                                  &lt;label class="left-align"&gt;${personForm.owner.name} &lt;/label&gt;
                                  &lt;form:hidden path="owner"/&gt;
                              &lt;/c:otherwise&gt;
                          &lt;/c:choose&gt;
                      &lt;/h:field&gt;
                      &lt;h:field path="visibleToChildren" code="organization.parent"
                          labelRequired="false"&gt;
                          &lt;div class="row-fluid form-inline"&gt;
                              &lt;input type="checkbox" name="visibleToChildren"
                                  &lt;c:if test='${personForm.visibleToChildren}'&gt;checked&lt;/c:if&gt;&gt;&amp;nbsp;&amp;nbsp;&lt;label&gt;&lt;spring:message
                                      code="organization.visible.children.all" /&gt;&lt;/label&gt;
                          &lt;/div&gt;
                      &lt;/h:field&gt;
  
          &lt;/div&gt;
          &lt;div class="span6" id="Clear2"&gt;
                      &lt;c:set var="mobileIndex" value="1"&gt;&lt;/c:set&gt;
                      &lt;c:set var="fixedIndex" value="1"&gt;&lt;/c:set&gt;
                      &lt;c:if test="${personForm.addressList[0].fixedLine == true}"&gt;
                          &lt;c:set var="codeval1" value="person.fixed.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[0].fixedLine != true}"&gt;
                          &lt;c:set var="codeval1" value="person.mobile.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[1].fixedLine == true}"&gt;
                          &lt;c:set var="codeval2" value="person.fixed.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[1].fixedLine != true}"&gt;
                          &lt;c:set var="codeval2" value="person.mobile.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[2].fixedLine == true}"&gt;
                          &lt;c:set var="codeval3" value="person.fixed.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[2].fixedLine != true}"&gt;
                          &lt;c:set var="codeval3" value="person.mobile.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[3].fixedLine == true}"&gt;
                          &lt;c:set var="codeval4" value="person.fixed.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[3].fixedLine != true}"&gt;
                          &lt;c:set var="codeval4" value="person.mobile.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[4].fixedLine == true}"&gt;
                          &lt;c:set var="codeval5" value="person.fixed.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
                      &lt;c:if test="${personForm.addressList[4].fixedLine != true}"&gt;
                          &lt;c:set var="codeval5" value="person.mobile.number"&gt;&lt;/c:set&gt;
                      &lt;/c:if&gt;
              &lt;div class="span2"&gt;&lt;/div&gt;&lt;h6&gt;&lt;label style="text-align: left;"&gt; &lt;spring:message code="numbers.ordering" /&gt;&lt;/label&gt; &lt;/h6&gt;
              &lt;div  class="span12"&gt;
              &lt;div class="span1"&gt;&lt;/div&gt;
              &lt;div data-sortable="#" class="span10"&gt;
              &lt;h:drag-drop path="addressList[0]" code="${codeval1}" cssClass="dragControl"&gt;
                  &lt;div class="input-prepend"&gt;
                      &lt;span class="add-on"&gt;+&lt;/span&gt;
                      &lt;form:input class="add-on" path="addressList[0].countryCode"
                          cssClass="input-micro" /&gt;
                      &lt;form:hidden path="addressList[0].fixedLine" /&gt;
                  &lt;/div&gt;&amp;nbsp;
                                      &lt;form:input
                      cssClass="input-medium" id="prependedInput"
                      path="addressList[0].number" /&gt;
              &lt;/h:drag-drop&gt;
              &lt;h:drag-drop path="addressList[1]" code="${codeval2}" cssClass="dragControl"&gt;
                  &lt;div class="input-prepend"&gt;
                      &lt;span class="add-on"&gt;+&lt;/span&gt;
                      &lt;form:input path="addressList[1].countryCode"
                          cssClass="input-micro" /&gt;
                      &lt;form:hidden path="addressList[1].fixedLine" /&gt;
                  &lt;/div&gt;&amp;nbsp;
                                      &lt;form:input
                      cssClass="input-medium" path="addressList[1].number" /&gt;
              &lt;/h:drag-drop&gt;
              &lt;h:drag-drop path="addressList[2]" code="${codeval3}" cssClass="dragControl"&gt;
                  &lt;div class="input-prepend"&gt;
                      &lt;span class="add-on"&gt;+&lt;/span&gt;
                      &lt;form:input path="addressList[2].countryCode"
                          cssClass="input-micro" /&gt;
                      &lt;form:hidden path="addressList[2].fixedLine" /&gt;
                  &lt;/div&gt;&amp;nbsp;
                                      &lt;form:input
                      cssClass="input-medium" path="addressList[2].number" /&gt;
              &lt;/h:drag-drop&gt;
              &lt;h:drag-drop path="addressList[3]" code="${codeval4}" cssClass="dragControl"&gt;
                  &lt;div class="input-prepend"&gt;
                      &lt;span class="add-on"&gt;+&lt;/span&gt;
                      &lt;form:input path="addressList[3].countryCode"
                          cssClass="input-micro" /&gt;
                      &lt;form:hidden path="addressList[3].fixedLine" /&gt;
                  &lt;/div&gt;&amp;nbsp;
                                      &lt;form:input
                      cssClass="input-medium" path="addressList[3].number" /&gt;
              &lt;/h:drag-drop&gt;
              &lt;h:drag-drop path="addressList[4]" code="${codeval5}" cssClass="dragControl"&gt;
                  &lt;div class="input-prepend"&gt;
                      &lt;span class="add-on"&gt;+&lt;/span&gt;
                      &lt;form:input path="addressList[4].countryCode"
                          cssClass="input-micro" /&gt;
                      &lt;form:hidden path="addressList[4].fixedLine" /&gt;
                  &lt;/div&gt;
                                      &amp;nbsp;
                                      &lt;form:input
                      cssClass="input-medium" path="addressList[4].number" /&gt;
  
              &lt;/h:drag-drop&gt;
              &lt;/div&gt;
              &lt;/div&gt;
              &lt;/br&gt;
              &lt;div&gt;&lt;/br&gt; &amp;nbsp; &lt;/div&gt;
              &lt;h:field path="addressList[5]" code="person.email.address1"&gt;
                  &lt;form:input path="addressList[5].value" cssClass="input-larger" /&gt;
                  &lt;spring:bind path="addressList[5].type"&gt;
                      &lt;input id="addressList5.type" type="hidden" class="input-micro"
                          name="addressList[5].type" value="EMAIL"&gt;
                  &lt;/spring:bind&gt;
              &lt;/h:field&gt;
              &lt;h:field path="addressList[6]" code="person.email.address2"&gt;
                  &lt;form:input path="addressList[6].value" cssClass="input-larger" /&gt;
                  &lt;spring:bind path="addressList[6].type"&gt;
                      &lt;input id="addressList5.type" type="hidden" class="input-micro"
                          name="addressList[6].type" value="EMAIL"&gt;
                  &lt;/spring:bind&gt;
              &lt;/h:field&gt;
              &lt;h:field path="addressList[7]" code="person.email.address3"&gt;
                  &lt;form:input path="addressList[7].value" cssClass="input-larger" /&gt;
                  &lt;spring:bind path="addressList[7].type"&gt;
                      &lt;input id="addressList5.type" type="hidden" class="input-micro"
                          name="addressList[7].type" value="EMAIL"&gt;
                  &lt;/spring:bind&gt;
              &lt;/h:field&gt;
              &lt;h:field path="addressList[8]" code="person.email.address4"&gt;
                  &lt;form:input path="addressList[8].value" cssClass="input-larger" /&gt;
                  &lt;spring:bind path="addressList[8].type"&gt;
                      &lt;input id="addressList5.type" type="hidden" class="input-micro"
                          name="addressList[8].type" value="EMAIL"&gt;
                  &lt;/spring:bind&gt;
              &lt;/h:field&gt;
              &lt;h:field path="addressList[9]" code="person.email.address5"&gt;
                  &lt;form:input path="addressList[9].value" cssClass="input-larger" /&gt;
                  &lt;spring:bind path="addressList[9].type"&gt;
                      &lt;input id="addressList5.type" type="hidden" class="input-micro"
                          name="addressList[9].type" value="EMAIL"&gt;
                  &lt;/spring:bind&gt;
              &lt;/h:field&gt;
          &lt;/div&gt;
  </code></pre></li>
  </ol>
  
  <p><strong>The reset jQuery code i want to use is like</strong></p>
  
  <pre><code>$(function(){
       $('#clearData').click(function(){
  
      }); 
  
  });
  </code></pre>
  
  <p><strong>However Im not sure How do I go about writing the code to reset mentioned values on click of RESET</strong>  </p>