How it works...

Entities in Drupal have various view modes for each bundle. In Drupal 7, there were only display view modes, which are covered in the next recipe. Drupal 8 brings in new form modes to allow for more control of how an entity edit form is displayed.

Form display modes are configuration entities. Form display modes dictate how the \Drupal\Core\EntityContentEntityForm class will build a form when an entity is edited. This will always be set to default unless changed or specified to a different mode programmatically.

Since form display modes are configuration entities, they can be exported using configuration management.

Hidden field properties will have no value unless there is a provided default value. For example, if you hide the authoring information without providing code to set a default value, the content will be authored by anonymous (no user).