Skip to main content
added 1 character in body
Source Link

Try this one:

$field$fields = \Drupal::service('entity_field.manager')->getFieldDefinitions('contact_message', 'personal');

You can change personal to your contact form bundle.

Try this one:

$field = \Drupal::service('entity_field.manager')->getFieldDefinitions('contact_message', 'personal');

You can change personal to your contact form bundle.

Try this one:

$fields = \Drupal::service('entity_field.manager')->getFieldDefinitions('contact_message', 'personal');

You can change personal to your contact form bundle.

Source Link

Try this one:

$field = \Drupal::service('entity_field.manager')->getFieldDefinitions('contact_message', 'personal');

You can change personal to your contact form bundle.