Drupal 8 Display True/False instead 0/1 on checkbox value in ConfigFormBase By default the boolean fields' value displayed as 0/1 when user filled the checkbox field under custom configuration form. Need to render True/False instead of 0/1. 

$form['newfield'][$id]['required'] = array(
  '#type' =&gt; 'checkbox', 
  '#default_value' =&gt; ($config[$id]['required'] ? $config[$id]['required'] : $field['required_disabled']), 
  '#disabled' =&gt; $field['required_disabled'], 
);

public function submitForm(array &amp; $form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);
    $config = $this - &gt; config($this - &gt; configId);
    $fields = static::getFields();
    $values = $form_state - &gt; getValues();
    $values = $values['newfield'];
    foreach($values as $key =&gt; $field) {
        $config_values[$key] = array('visible' =&gt; $field['visible'], 'required' =&gt; $field['required'], );
    }
}
In drupal8, you can easily handle this from "Manage Display" of your content type.


  Go to /admin/structure/types/manage/article/display
  Select your "view_mode". Ex- Default.





  Go to the boolean field and click on its settings icon which is placed at atmost right side of the field.
  Change the output format to "True/False".




Hope, this works for you.