I
I
Igor2017-12-01 13:21:25
Drupal
Igor, 2017-12-01 13:21:25

How to get contact form code in DRUPAL8?

How to get contact form code in DRUPAL8?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2017-12-06
@pingvin156

Mb who will need it:

$message = \Drupal::entityManager()->getStorage('contact_message')->create(array(
'contact_form' => ,
));
$form = \Drupal::service('entity.form_builder')->getForm($message);
$txtBlock = \Drupal::service('renderer')->render($form);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question