I'm using D8's core contact form, I have added some custom fields and I want to change one of custom fields' settings config programatically.
I have tried this
\Drupal::service('entity_field.manager')->getFieldDefinitions('contact_form')
but I get error:
LogicException: Getting the base fields is not supported for entity type Contact form. in Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions() (line 204 of core/lib/Drupal/Core/Entity/EntityFieldManager.php).
Is there any way to get list of fields and update their configs and settings?