title: Radio buttons with react-hook-form
body: <p>I created a form with react-hook-form. It logs &quot;fullName&quot; and &quot;city&quot; correctly in the console, but not the radio buttons. With the radio buttons you get as result &quot;null&quot;.</p>
  <p>My code is as follows.</p>
  <pre><code>import React from 'react'
  import './App.css';
  import {useForm} from &quot;react-hook-form&quot;;
  
  function App() {
      const {register, handleSubmit} = useForm();
  
      function onSubmitButton(data) {
          console.log(data)
      }
  
      return (
          &lt;&gt;
              &lt;h1&gt;Order weather&lt;/h1&gt;
              &lt;form onSubmit={handleSubmit(onSubmitButton)}&gt;
                  &lt;input
                      {...register(&quot;fullName&quot;)}
                      type=&quot;text&quot;
                      name=&quot;fullName&quot;
                      placeholder=&quot;Name and surname&quot;
                      id=&quot;name&quot;
                  /&gt;
                  &lt;input
                      {...register(&quot;city&quot;)}
                      type=&quot;text&quot;
                      name=&quot;city&quot;
                      placeholder=&quot;City&quot;
                      id=&quot;city&quot;
                  /&gt;
                  &lt;p&gt;I would like to:&lt;/p&gt;
                  &lt;label htmlFor=&quot;field-rain&quot;&gt;
                      &lt;input
                          {...register(&quot;rain&quot;)}
                          type=&quot;radio&quot;
                          name=&quot;weather&quot;
                          value=&quot;rain&quot;
                          id=&quot;field-rain&quot;
                      /&gt;
                      Rain
                  &lt;/label&gt;
                  &lt;label htmlFor=&quot;field-wind&quot;&gt;
                      &lt;input
                          {...register(&quot;wind&quot;)}
                          type=&quot;radio&quot;
                          name=&quot;weather&quot;
                          value=&quot;wind&quot;
                          id=&quot;field-wind&quot;
                      /&gt;
                      Lots of wind
                  &lt;/label&gt;
                  &lt;label htmlFor=&quot;field-sun&quot;&gt;
                      &lt;input
                          {...register(&quot;sun&quot;)}
                          type=&quot;radio&quot;
                          name=&quot;weather&quot;
                          value=&quot;sun&quot;
                          id=&quot;field-sun&quot;
                      /&gt;
                      Sunny
                  &lt;/label&gt;
                  &lt;button type=&quot;submit&quot;&gt;
                      Send
                  &lt;/button&gt;
              &lt;/form&gt;
          &lt;/&gt;
      );
  }
  
  export default App;
  </code></pre>
  <p>When I turn off <code>name= &quot;weather&quot;</code> and I check the buttons it does put it in the console, but it is not supposed to allow me to check all the buttons at the same time. Anyone have an idea how I can make sure I can get what is checked into the console?</p>