I see help text in contact forms as below
"If you would like additional text to appear on a site-wide contact page, beyond field labels, use a block. You can create and edit blocks on the Block layout page, if you have the Block module installed."

How ever I could not find any help on how to create one for contact forms
My requirement is i want to give addresses of different locations by the side of this form
Can some one help please?

Comments

kaizerking created an issue. See original summary.

cilefen’s picture

Version: 8.0.6 » 8.1.x-dev
kaizerking’s picture

Title: How to create block for contct form » How to create block for contact form
Issue summary: View changes
naveenvalecha’s picture

Category: Support request » Feature request

contrib modules contact_block and formblock are the options atm

for core its a FR

cilefen’s picture

Version: 8.1.x-dev » 8.2.x-dev
kaizerking’s picture

#4 naveenvalecha,Contact block cannot be used, it does not show as an referable entity,It wont show as bundle under entity reference.If we create a custom block a "link" appears and not form.I want to use D8 in my production site and I am thinking to go back to D7 only because of this . I will try form block but the project page says it is good for panels. i will post if I succeed.

jibran’s picture

Title: How to create block for contact form » Add contact_block to core

@kaizerking contact block suits perfectly to your need. Perhaps create a bug report for #6 in contact form issue queue.

As for the feature request I think http://cgit.drupalcode.org/contact_block/tree/src/Plugin/Block/ContactBl... can be moved to core/contact_storage with some tests.

I'd suggest moving this feature request to contact_storage for now and we can move this to core as part of #2582955: Contact module roadmap: 80% usecase of webforms in core.

kaizerking’s picture

@jibran IMHO I think this issue should not be viewed as an isolated issue related to contact form, I just tested "Form Block" too, "Form block" treats node form as an entity. I fail to understand why "any form" should not be treated as an entity? perhaps a form entity should always be an embedded entity when referenced.....?

jibran’s picture

Title: Add contact_block to core » How to create block for contact form
Category: Feature request » Support request
Status: Active » Fixed

@kaizerking I think you are confusing the idea of entity and forms.

Anything with the id is called entity. In Drupal 8 we have two type of entities content and config. Content entities are used to store data and config entities are stored to configurations.

Form OTOH are just plain old html form. Forms are used to take input for config or content entities.

For example we have node types(called content type in the ui) to store the bundle(configuration) information of nodes(called content in the ui) hence node type is config entities and node is a content entity.

Just like node types we have ContactForm entity to store the configuration of a contact form displayed to the user by default Drupal 8 has two types of contact forms 'Personal contact form' and 'Website feedback'.

Just like node we have Message entity which is a content entity. It stores the data entered in the form by the user. By default core doesn't allow you to add fields to the message entity you can use contact_storage module to make it fieldable.

Now to the problem in hand. You want to show a contact form in the block. Just to be clear this is a message entity add form. Now to show the entity from in the block there is a module called entityform_block. There is a Drupal 8 version for it with tests and it is maintained by well known core contributors form MD Systems so I'd say it is pretty good module.

Feel free to ask anymore questions.

@naveenvalecha I'm going to close it as a support request. If you want to create a feature request then create a new issue for contact storage.

kaizerking’s picture

Status: Fixed » Active

I think we drifted away from the original issue. My problem is I wanted to display contact form and also "addresses" like locate us side by side That's what is the issue here. to get that

"I see help text in contact forms as below. If you would like additional text to appear on a site-wide contact page, beyond field labels, use a block. You can create and edit blocks on the Block layout page, if you have the Block module installed."

This is not solved please do not close the issue

naveenvalecha’s picture

use contact storage module and add an entity reference in the block type as explained here. http://flocondetoile.fr/blog/drupal-8-inject-contact-form-inside-content...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

cilefen’s picture

Status: Active » Closed (works as designed)