I have created a drupal8 module that programmatically created custom user fields. It display in Manage fields section but not enable/view inside Manage form display and Manage display section.
I have tried to override entiry_form_display but not get success.
core.entity_form_display.user.facebook.default.yml
langcode: en
status: true
dependencies:
config:
- field.field.user.user.field_facebook
module:
- field_layout
- layout_discovery
- user
id: user.field_facebook.default
targetEntityType: user
bundle: field_facebook
mode: default
content:
field_facebook:
type: string
weight: 200
label: above
settings:
link_to_entity: false
third_party_settings: { }
hidden: { }
field.field.user.user.field_facebook.yml
langcode: en
status: true
dependencies:
config:
- field.storage.user.field_facebook
module:
- user
id: user.user.field_facebook
field_name: field_facebook
entity_type: user
bundle: user
label: 'Facebook'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
field.storage.user.field_fullcontact_facebook.yml
langcode: en
status: true
dependencies:
module:
- user
id: user.field_facebook
field_name: field_facebook
entity_type: user
type: string
settings: {
max_length: 255
is_ascii: false
case_sensitive: false
}
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
persist_with_no_fields: true
Give it a try.