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
Comment #2
cilefen commentedComment #3
kaizerking commentedComment #4
naveenvalechacontrib modules contact_block and formblock are the options atm
for core its a FR
Comment #5
cilefen commentedComment #6
kaizerking commented#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.
Comment #7
jibran@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.
Comment #8
kaizerking commented@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.....?
Comment #9
jibran@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.
Comment #10
kaizerking commentedI 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
This is not solved please do not close the issue
Comment #11
naveenvalechause 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...
Comment #23
cilefen commented