Checkbox fields not being submitted with Netlify Forms

Hi Hilary, thanks for the feedback. I didn’t find anything applicable to this situation in the support guide. I was initially separating the labels from the inputs, using the “for” attribute, which prevented my radio buttons from working, too. After reading this thread, I refactored the checkboxes and radio buttons. The radio buttons work (but the legend text doesn’t display in the submission data), but the checkboxes don’t.

Here’s an example of the submission data (the “Under $10,000” isn’t the checked radio, this is where the radio legend is supposed to go, so that’s broken, too):

Bot Field

First Name*
Name

Last Name*
Last

Email*
my@emaild.com

Phone
123456789

Under $10,000
$10,000 - $30,000

Project Summary*
Form submissions for real!

The live form can be seen here. The form in question is named get-started-form and is on a popout modal that can be accessed through the “Get Started” button. When viewing the page source, it can be found just above the closing body tag.

This is the JavaScript code I’m using to validate and submit the form:

// Form validation
(function() {
  'use strict';
  const forms = document.querySelectorAll('.needs-validation');
  Array.from(forms)
    .forEach(function(form) {
      form.addEventListener('submit', function(event) {
        if (!form.checkValidity()) {
          event.preventDefault();
          event.stopPropagation();
        } else if (form.checkValidity() == true) {
          event.preventDefault();
          form.submit();
        }
        form.classList.add('was-validated');
      }, false);
    });
})();