Fields that are imported via config are disabled by default. How to enable them?

Viewed 1389

In a custom module for Drupal 8 I'm able to add a new content type with all of its fields, but all of the fields are disabled by default. How do I enable them during install of my module?

Edit To be clear, module fields are not being enabled by default under Manage Form Display. How do I enable (or disable) fields using something like hook install?

Edit 2 Along with enabling fields by default in a newly created content type, installing this module also updates fields on an existing content type (Article) and those fields are also disabled.

Edit 3 disabled meaning they are shown as disabled on the form display for the content type and users cannot see the fields when adding content.

There must be code that I can run via hook_install that enabled fields on a content type?

3 Answers
Related