node_type_example module provides a file that defines form display configuration for a custom node type defined in this module. The file is named core.entity_form_display.node.basic_content_type.default.yml.

The example file clearly sets some field settings but is there a a schema for these config files? How to build my own config file for view mode and form mode?

  • See core.entity_form_mode.user.register.yml that defines the entity form mode or \Drupal\Core\Entity\Entity\EntityFormDisplay entity
    – user21641
    Commented Mar 22, 2016 at 12:59
  • core.entity_form_mode.user.register.yml doesn't seem to be relevant. It's virtually empty and it's not configuring any fields. EntityFormDisplay on the other hand is a class implementing EntityFormDisplayInterface which is also no relevant. I'm asking about schema for the yml config files for node form mode and node view mode. Commented Mar 22, 2016 at 16:55

1 Answer 1


First, form/user mode and form/user display isn't the same thing.

But the schema for all of them is in in core/config/schema/core.entity.schema.yml.

That said, I'm not sure why you want to build that file? Especially for a node type. Create the node type and the fields, configure the form and view displays in the UI, export it, add the files to your modules, don't. You don't have to build them yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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