title: Jquery accepting multiple inputs isn't responding
body: <p>I'm trying to make my system which accept multiple Yes/No questions, however, when I try to submit I am getting an error in the console that I am unsure of and nothing is returned from the query. I was previously using an Array while serializing the data but I need to use an Array List now, I have not used jQuery that much and am still unsure of what I am doing wrong. Answers and explanations greatly appreciated. I don't think I am passing the values through correctly but I am not sure how.</p>
  
  <p>Update**
  I put one of the rules "Email address required" back into the initial way of doing it and it accepts it. It also shows this decision in the new box. If I select No email required, the checkbox for no in email address shows so clearly it is reading correctly from the database, it's just not sending anything to it. Also when I try and enter a rule using this method it disable the form elements then does nothing.</p>
  
  <p>Current JavaScript</p>
  
  <pre><code>    window.onunload = refreshParent;
      function refreshParent() {
          window.opener.location.reload();
      }
  
  $body = $("body");
  
  $(document).on({
      ajaxStart: function() { $body.addClass("loading");    },
      ajaxStop: function() { $body.removeClass("loading"); } 
  });
  
  $(document).ready(function() {
  // Variable to hold request
  var request;
  
  $(".chosen-select").chosen({width: '300px'});
  
  //$("#distance_slider").slider({});
  
  // Bind to the submit event of our form
  $("#additional_criteria").submit(function(event){
  
      // Prevent default posting of form - put here to work in case of errors
      event.preventDefault();
  
      // Abort any pending request
      if (request) {
          request.abort();
      }
      // setup some local variables
      var $form = $(this);
  
      //$("#isajax").val("1");    
  
      // Let's select and cache all the fields
      var $inputs = $form.find("input, select, button, textarea");
  
      // Serialize the data in the form
      var serializedData = $form.serializeArray();
  
      // Let's disable the inputs for the duration of the Ajax request.
      // Note: we disable elements AFTER the form data has been serialized.
      // Disabled form elements will not be serialized.
      $inputs.prop("disabled", true);
  
          // Fire off each request to /form.php
          for(let oneObject of serializedData){
      $.post({
              url: "index.php?module=Prospects&amp;action=PopupContactsCriteria&amp;html=Popup_Contacts_Criteria_picker&amp;form=ContactsForm&amp;record={RECORD_VALUE}&amp;first_run=1&amp;form_submit=true&amp;query=true&amp;sugar_body_only=1",
              data: oneObject
          })
      }
  
  
  
      // Callback handler that will be called on success
      request.done(function (response, textStatus, jqXHR){
          // Log a message to the console
          //console.log("Hooray, it worked!");
          //console.log(response);
          document.open();
          document.write(response);
          document.close();
      });
  
      // Callback handler that will be called on failure
      request.fail(function (jqXHR, textStatus, errorThrown){
          // Log the error to the console
          console.error(
              "The following error occurred: "+
              textStatus, errorThrown
          );
      });
  
      // Callback handler that will be called regardless
      // if the request failed or succeeded
      request.always(function () {
          // Reenable the inputs
          $inputs.prop("disabled", false);
      });
  
  });
  </code></pre>
  
  <p>Current HTML to send data to the Jquery</p>
  
  <pre><code>&lt;button onclick="myFunction()"&gt;Show Additional Rules (*Not Required)&lt;/button&gt;
  
  &lt;div id="myDIV" hidden="true"&gt;
      &lt;table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view"&gt;
          &lt;tr&gt;
          &lt;td&gt;
              &lt;form id="additional_criteria" name="additional_criteria"&gt;
  
                  &lt;table width="100%" border="0" name="additional_criteria"&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;p&gt;&lt;Strong&gt; Additional Rules&lt;/strong&gt;&lt;p/&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td width="50%"&gt;Email Address Required?  &lt;/td&gt;&lt;td class="dataLabel" name="email" id="email" &gt; Yes &lt;input type="radio" name="email_c" value="true_ex" {EMAIL_TEX_CHECKED}&gt;  No &lt;input type="radio" name="email_c" value="false" {EMAIL_F_CHECKED}&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;Do they need to have an account?&lt;/td&gt;&lt;td class="dataLabel" name="account" id="account" &gt;  Yes  &lt;input type="radio" name="account_c" value="True" {ACCOUNT_T_CHECKED}&gt;  No  &lt;input type="radio" name="account_c" value="False" {ACCOUNT_F_CHECKED}&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;Are they subscribed to AWC Newsletter? &lt;/td&gt;&lt;td class="dataLabel" name="awc" id="awc" &gt;  Yes &lt;input type="radio" name="awc_c" value="True"&gt; No &lt;input type="radio" name="awc_c" value="False"&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt; Do they need to have a mobile?&lt;/td&gt;&lt;td class="dataLabel" name="mobile" id="mobile"  &gt;   Yes  &lt;input type="radio" name="mobile_c" value="True" {MOBILE_T_CHECKED}&gt;  No &lt;input type="radio" name="mobile_c" value="False" {MOBILE_F_CHECKED}&gt;&lt;/td&gt;
                      &lt;/tr&gt;
  
  
  
                      &lt;tr&gt;
                          &lt;td align="right" name="buttonForm" id="buttonForm"&gt;
                              &lt;input type="hidden" name="action" value="PopupContactsCriteria"/&gt;
                              &lt;input type="hidden" name="query" value="true"/&gt;
                              &lt;input type="hidden" name="record" value="{RECORD_VALUE}"/&gt;
                              &lt;input type="hidden" name="module" value="{MODULE_NAME}" /&gt;
                              &lt;input type="hidden" name="form_submit" value="{FORM_SUBMIT}" /&gt;
                              &lt;input type="hidden" name="sugar_body_only" value="1" /&gt;
                              &lt;input type="hidden" name="form" value="{FORM}" /&gt;          
                              &lt;input class="button" type="submit" name="addAdditionalButton" id="addAdditionalButton" value="  Add Additional  " /&gt;
                          &lt;/td&gt;   
                  &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/form&gt;
          &lt;/td&gt;
          &lt;/td&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Console Error</p>
  
  <pre><code>index.php?module=Prospects&amp;action=PopupContactsCriteria&amp;html=Popup_Contacts_Criteria_picker&amp;form=ContactsForm&amp;record=a4e26920-e375-42f8-0168-5b63421aa7c7&amp;form_submit=true&amp;query=true&amp;sugar_body_only=1&amp;delete=exclude_awc:237 Uncaught TypeError: Cannot read property 'done' of undefined
      at HTMLFormElement.&lt;anonymous&gt; (index.php?module=Prospects&amp;action=PopupContactsCriteria&amp;html=Popup_Contacts_Criteria_picker&amp;form=ContactsForm&amp;record=a4e26920-e375-42f8-0168-5b63421aa7c7&amp;form_submit=true&amp;query=true&amp;sugar_body_only=1&amp;delete=exclude_awc:237)
      at HTMLFormElement.dispatch (jquery.min.js:3)
      at HTMLFormElement.v.handle (jquery.min.js:3)
  (anonymous) @ index.php?module=Prospects&amp;action=PopupContactsCriteria&amp;html=Popup_Contacts_Criteria_picker&amp;form=ContactsForm&amp;record=a4e26920-e375-42f8-0168-5b63421aa7c7&amp;form_submit=true&amp;query=true&amp;sugar_body_only=1&amp;delete=exclude_awc:237
  dispatch @ jquery.min.js:3
  v.handle @ jquery.min.js:3
  8jquery.min.js:5 POST http://217.156.214.229/crm/[object%20Object] 404 (Not Found)
  send @ jquery.min.js:5
  ajax @ jquery.min.js:5
  b.(anonymous function) @ jquery.min.js:5
  (anonymous) @ index.php?module=Prospects&amp;action=PopupContactsCriteria&amp;html=Popup_Contacts_Criteria_picker&amp;form=ContactsForm&amp;record=a4e26920-e375-42f8-0168-5b63421aa7c7&amp;form_submit=true&amp;query=true&amp;sugar_body_only=1&amp;delete=exclude_awc:228
  dispatch @ jquery.min.js:3
  v.handle @ jquery.min.js:3
  </code></pre>