'#type' => 'machine_name',
'#default_value' =>
$contact_form->
id(),
'#maxlength' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
'#machine_name' =>
[ 'exists' => '\Drupal\contact\Entity\ContactForm::load',
],
'#disabled' => !
$contact_form->
isNew(),
];
$form['recipients'
] =
[ '#type' => 'textarea',
'#title' =>
$this->
t('Recipients'
),
'#default_value' =>
implode(', ',
$contact_form->
getRecipients()),
'#description' =>
$this->
t("Example: 'webmaster@example.com' or 'sales@example.com,support@example.com' . To specify multiple recipients, separate each email address with a comma."
),
'#required' => TRUE,
];
$form['message'
] =
[ '#type' => 'textarea',
'#title' =>
$this->
t('Message'
),
'#default_value' =>
$contact_form->
getMessage(),
'#description' =>
$this->
t('The message to display to the user after submission of this form. Leave blank for no message.'
),
];
$form['redirect'
] =
[ '#type' => 'path',