I added a new Boolean field to a content type. For some nodes, I did set this field.

node edit form

Still, the field value is not shown on the node page.

node view


I realize that, as long no value is set for the new field, it isn't present in the database, but (as seen in the screenshots) on that node, the field is set to true and it should be shown on the node page, shouldn't it?

  • 1
    Did check the display mode of your node, the field it may be hidden ?
    – berramou
    Jan 7 '20 at 19:46
  • How it's rendered depends from the display formatter. For example, a display formatter could render it yes when the field checkbox is selected.
    – apaderno
    Jan 7 '20 at 20:45
  • @kiamlaluno, the D7 formatter only has default or KEY, the formatter you mention is available only in D8 or for D7 through a separate module drupal.org/project/boolean_formatter
    – sirtet
    Jan 8 '20 at 15:37
  • @berramou no, the field is not hidden, as you can see the label being rendered in the screenshot. Anyways, thanks both! It still helped my own thinking.
    – sirtet
    Jan 8 '20 at 15:39

This is a Durpal 7 Problem. It lies about that it will fall back to 0/1 if you don't provide your custom true/false values, when it actually does not fall back. See https://www.drupal.org/project/drupal/issues/1750950

In short, in the field-settings, you have to set on-/off- values. If you don't the default renderer will output an empty string and in the edit forms the field's checkbox or radio-buttons will have no label.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.