title: Programatically change Redux-Form Checkbox Field value
body: <p>I have a register form. When user accept term of services, he clicks on a button which check the checkbox. When he clicks on decline, this button uncheck the checkbox.</p>
  
  <p><a href="https://i.stack.imgur.com/mfkcY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mfkcY.png" alt="The checkbox"></a>
  <a href="https://i.stack.imgur.com/0JrhH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0JrhH.png" alt="The button to accept"></a></p>
  
  <p>I read <a href="https://stackoverflow.com/questions/45230531/programatically-change-redux-form-field-value?answertab=active#tab-top">this answer to programmatically change redux-form values</a>. I am able to change any field except checkbox.</p>
  
  <p>Here are my code:</p>
  
  <pre><code>class RegisterContainer extends Component {
    constructor(props) {
      super(props);
      this.state = {
        modalTOS: false
      };
  
      this.accept = this.accept.bind(this);
      this.decline = this.decline.bind(this);
      this.toggleTOSModal= this.toggleTOSModal.bind(this);
    }
  
    accept() {
      this.props.actions.change("register", "email", "foo42bar"); //This is a working test
      this.props.actions.change("register", "read", true);
      this.toggleTOSModal();
    }
    decline() {
      this.props.actions.change("register", "read", false);
      this.toggleTOSModal();
    }
  
    // ....
  </code></pre>
  
  <p>I added this line only to check if email value could be changed:</p>
  
  <pre><code>this.props.actions.change("register", "email", "foo42bar");
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/pR2sS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pR2sS.png" alt="Email is changing..."></a></p>
  
  <p>It works !</p>
  
  <p>Step by step, I tried a lot of options to check , but no one has changed checkbox:</p>
  
  <pre><code>this.props.actions.change("register", "read", "on");
  this.props.actions.change("register", "read", true);
  this.props.actions.change("register", "read", "1");
  this.props.actions.change("register", "read", 1);
  this.props.actions.change("register", "read", "true");
  this.props.actions.change("register", "read", "a");
  </code></pre>
  
  <p>In validator, I added some <code>console.error</code> . With manual check or via the accept button, value is true. But Checkbox don't check</p>
  
  <p>edit: My field declaration:</p>
  
  <pre><code>&lt;Field name="read" component={FormCheckBoxGroup} {...fieldProps} onClick={onClickTos} required /&gt;
  </code></pre>
  
  <p>FormCheckBoxGroup:</p>
  
  <pre><code>&lt;FormGroup check&gt;
    &lt;Col sm={{ size: 8, offset: 4 }}&gt;
      &lt;Label check className={className}&gt;
        &lt;Input {...input} type="checkbox" disabled={disabled} required={required} /&gt;
        {label}
      &lt;/Label&gt;
      {!required &amp;&amp; helpBlock &amp;&amp; &lt;HelpBlock&gt;{helpBlock}&lt;/HelpBlock&gt;}
      {error &amp;&amp; &lt;HelpBlockErrors errors={messages} /&gt;}
      {children}
    &lt;/Col&gt;
  &lt;/FormGroup&gt;
  </code></pre>
  
  <p>Have someone an idea?</p>