Select input options being passed as field label in submissions

I’m using Gatsby and all the fields are named correctly in submissions except for my select input. Netlify is registering the label of the select input as well as all its options as part of the name of the label.

Here is my select component:

    display: "block",
    {required && "*"}
    onBlur={() => onBlur(name, true)}
    { => (
      <option value={o.value} key={o.value}>
  {error && <p sx={{ color: "rainbowRed" }}>{error}</p>}

Netlify instance:

Hi there! I love your site - very important work you are doing!

Can you direct us toward the clear html version of the form?

Hi Perry!

Thanks. I’ve figured it out, for some reason having the htmlFor (react) on the label and id on the select input, caused this issue. I’m not entirely sure why.

This was the static html that was generated from Gatsby prior to the fix, and it all looks fine so unsure why it was a problem.

  <label for="stateselect" class="css-13o7eu2">
          <span class="BookWorkshop__SelectLabel-sc-15t5adi-1 jkxZVi">
            class="BookWorkshop__SelectOuter-sc-15t5adi-2 lfmHtz"
            <option value="ACT">ACT</option>
            <option value="New South Wales">New South Wales</option>
            <option value="Northern Territory">Northern Territory</option>
            <option value="Queensland">Queensland</option>
            <option value="South Australia">South Australia</option>
            <option value="Tasmania">Tasmania</option>
            <option value="Victoria">Victoria</option>
            <option value="Western Australia">Western Australia</option>

looks OK to me as far as I can tell. Glad it’s working now, just ping us again if you need.