title: React Formik: How to set default value in formik when click the checkbox?
body: <p>I have a form that uses the <code>formik</code> react library. When clicking the checkbox I want to fill some data inside an input field in that. I don't know how to do that in a Formik way.</p>
  
  <p>Anyone please help me to solve this issue?</p>
  
  <p><strong>Code I tried :</strong></p>
  
  <pre><code>&lt;Formik initialValues={{ email: ''}}&gt;
  {({errors, touched, setFieldValue, handleSubmit, handleBlur, handleChange, isSubmitting}) =&gt; {
      return (&lt;Form onSubmit={handleSubmit}&gt;
          {console.log('touched',touched, errors)}
          &lt;div className="upload-container"&gt;
              OFFICIAL EMAIL
              &lt;input onBlur={handleBlur} onChange={handleChange} id="email_id" name="email" type="email"/&gt;
              &lt;div className="email-error__message__div"&gt;
                  {errors.email &amp;&amp; touched.email ? errors.email : ''}
              &lt;/div&gt;
              &lt;div className="official-MailID__container"&gt;
                  &lt;input 
                      id="checkOffiMailId"
                      name="checkofficialmailId"
                      type="checkbox" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div className="button__container"&gt;
              &lt;button className="verify-me" type="submit" disabled={isSubmitting}&gt;VERIFY ME&lt;/button&gt;
              &lt;button className="doit-later" onClick={doItLater}&gt;I'LL DO THIS LATER&lt;/button&gt;
          &lt;/div&gt;
      &lt;/Form&gt;
  )}}
  &lt;/Formik&gt;
  </code></pre>
  
  <p>I updated the question. What I want is when I clicked the <code>checkOffiMailId</code> I want to fill some data in <code>email_id</code>.</p>
  
  <p><a href="https://jaredpalmer.com/formik/docs/api/formik" rel="nofollow noreferrer">Formik Library</a></p>