The tag can refer to the contact form, a form that allows to contact other users, or specific site roles (e.g. the site maintainers); the Contact module, a Drupal core module that implement a contact form.

learn more… | top users | synonyms

0
votes
1answer
16 views

Migrate fields to another site?

I have a Drupal 8 site with a contact form that has a lot of fields. I need to duplicate these fields onto another Drupal 8 site but can't find where they are stored in the DB. In the config table ...
0
votes
1answer
21 views

How to add predefined text to contact form?

I would like to add a couple paragraphs of predefined text (not an input field) to my contact page. What are my options to do this in Drupal 8? Until this point I've been using JS to get the job ...
0
votes
1answer
34 views

How do I access the parameters fields of hook_mail_alter(&$message)?

I am using hook_mail_alter in drupal 8 to alter the email messages sent through contact form . How can I access $message['params'] fields in hook_mail_alter()? I am getting the following values with ...
0
votes
0answers
11 views

Why do I receive only 4 of 5 mails sent with the contact form?

On my D7 site, I use the default contact form. Every now and then, the website owner tells me, that he has not received mails sent by clients via the form - but when I tested it with some mails, we ...
0
votes
1answer
31 views

How to alter body of contact form?

When submitting a message in my site contact form in Drupal 8.x I have printed a message print_r($message['body'][1]);die; //in my modulename_mail_alter(&$message) I get the following ...
3
votes
1answer
55 views

Modal form instead of redirect

I have a site-wide contact form setup that redirects the user to the homepage and posts the submission result to the help section. It works as intended, but I was wondering what I would need to do to ...
0
votes
0answers
12 views

Contact Form make uploaded files permanent

When I upload some files through submitting a contact form the files uploaded are marked as temporary (status 0 in the database). Where can I find the setting to store these uploaded files ...
1
vote
2answers
41 views

How to change the email recipient for contact form

On a Drupal 8 site, I have a content type called TeamMember which has an email field. From the view where I show all the TeamMembers, I'd like to link to a form where the user can email that person ...
1
vote
0answers
10 views

Attach files uploaded with the contact form to mail

By default uploaded files in a contact form are uploaded to the server and a link is placed in the mail send to the recipients. Is there a way to attach the uploaded files to the mail itself rather ...
1
vote
1answer
29 views

Change contact form to email based on selection?

I am attempting to change the email a custom contact form is sent to based on what selection the user makes when filling out the form. Is there a way to do this in Drupal 8?
0
votes
1answer
32 views

Use Token in contact form as default value

I have a contact form build from the drupal core contact forms. I am trying to prefill some fields from URL GET parameters like this. /?foo=bar But it seems that "default value" doesnt support tokens....
0
votes
1answer
100 views

Emails are not sent

I am running Drupal 8 on a DigitalOcean server. I am trying to use the standard Drupal 8 Contact form to get user's email addresses. I currently have the form up and it is visible and holds the ...
1
vote
1answer
27 views

Where are contact form entries stored?

I am aware that Webform is now out of the Window and has more or less been replaced by Core Contact Forms. I created a form and it works great. Only problem is, I can't for the life of me find out: ...
1
vote
0answers
29 views

Theming the outgoing contact form mail

Having a problem theming or changing the looks of my outgoing contact form e-mails. I have followed this topic on the subject: How can I theme the outgoing contact mail? I have done all the points ...
2
votes
2answers
81 views

How do I programatically change default values in a contact form?

I have a Drupal 8 contact form where the form's placeholder values are the default values of the fields. Unfortunately, this site is multilingual and I don't think it's possible to translate default ...
0
votes
1answer
31 views

How can add Contact-Us-form in custom place of page.html.twig file? [duplicate]

I need to add contact-us form in the custom place of page.html.twig file in my themplate, I want to add some code like belove: <div class="Contact-Us"> <p>Contact Us</p> <...
1
vote
1answer
68 views

Send email to different email depending on taxonomy term

This was fairly simple to do in D7 and is a common request. How would I send an email to a different email address depending on a taxonomy term chosen from a dropdown box on the contact form?
1
vote
2answers
72 views

How do I split a contact form into multiple pages?

I have a huge form that's way too large for a single page. I would like to split this form up into a few separate pages. What are my options? Edit: Still haven't figured out how to do this with ...
0
votes
1answer
42 views

How do I attach a library to contact forms?

Simple question, I just need to know how to attach a library to Drupal 8's contact forms. I recently made a similar post for attaching a library to a view, that was accomplished by adding {{ ...
0
votes
1answer
51 views

Emails are not sent to outside domains

I deployed a Drupal 8 website, on a hosting service with cPanel, with domain mydomain.com. If I set this email address on the user profile: john.smith@example.com, that is an email address with a ...
1
vote
0answers
37 views

Contact form: recipient from node's Email field

Use case: Business Directory. Description: I need to create a dynamic contact form that will use each node's (business listing content type) individual Email field as the contact form's main recipient,...
0
votes
2answers
116 views

I want to override the template of the contact page

I use bootstrap as theme in Drupal 8, and I created a sub-theme. I want to override the contact page with a custom template. I added debug: true in services.yml, but I didn't find the right template ...
1
vote
1answer
274 views

Formatting email sent with Contact form [duplicate]

I created a custom form (adding some additional fields) using the Contact module from the core of Drupal 8. When I submit the form is sent an email containing all values, but it is really bad ...
0
votes
1answer
45 views

How to wrap a contact form with another block? [duplicate]

Is there a method to wrap a contact form with another block and make them together a new block or something? I want to put some information next to the contact form and put them together in a ...
3
votes
1answer
135 views

Adding check boxes to contact form

I am attempting to make a contact form in Drupal 8 using "Contact forms" included in core. I'm struggling to figure out how to really customize it, like adding radio buttons or check boxes - does ...
1
vote
3answers
252 views

How to place Contact form in block?

I have to embed a contact form inside of a block, and I'm trying to use the entity.form_builder service, But I'm not sure which entity I should give it, I found Message and ContactForm entity, so what ...
0
votes
1answer
122 views

Contact for per node in Drupal 8?

This was quite easy on Drupal 7. You could just use Webform. In Drupal 8, I'm not so sure. I have nodes of type "Business". I want a form to appear on this page, that when filled in, it must send an ...
2
votes
1answer
230 views

Contact form email template

Currently, the whole email generated by the Contact module is without a single line break. They look very ugly. Is there a way to edit the email template for specific contact forms?
0
votes
1answer
91 views

Get list of custom fields and update their settings programatically

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'...
0
votes
4answers
33 views

Pass NID to contact form

I have a website with a lot of furniture products. Each node page has a link to "ask for more info" that opens the sitewide contact form. When I receive the e-mail message, I need to know to which ...
2
votes
4answers
491 views

How can I theme the outgoing contact mail?

I want to theme the outgoing mail from the contact module, because the standard output looks horrible. Where can I do this? It's the one starting with admin (http://example.com/user/1) sent a message ...
1
vote
1answer
37 views

Change contact setting flood limit

I want to change the contact setting flood limit, but I don't find the correct place. How I change the flood limit for sent messages?
0
votes
2answers
49 views

Access submitted form data in custom callback before hook_mail_alter()

I wan't to alter contact form recipient according to what user chose in one of the dropdown fields of my Contact form. I implemented hook_form_FORM_ID_alter() in order to add custom submit callback ...
2
votes
3answers
1k views

Redirect contact form on submit

Using Drupal 8 and trying to get the contact form to redirect to the same page after submitting. By default it seem to redirect to the home page. I have edited my themename.theme file function ...
1
vote
0answers
45 views

How do I add a submission handler to the contact form?

I am trying to get a value from the query string and process it with contact form values to send in email. For example, I have a contact form with different fields. I want to load one node ...
0
votes
0answers
17 views

Token for default contactform subject

Is there a way to automatically fill in a subject in a personal contactform when clicking on a mail button in a view table. The privatemsg module can do that with tokens, that is exactly what I want, ...
0
votes
1answer
178 views

How to set or change path to Drupal 8 contact form?

Drupal 8 provides two default contact forms: "Personal contact form" and "Website feedback." While "Personal contact form" is added to each user's profile by default, to "Website feedback" Drupal ...
1
vote
2answers
157 views

Rendering contact_form

I have call my current contactform with this function in mytheme.theme. $form = Drupal::routeMatch()->getParameter('contact_form'); I have this object(Drupal\contact\Entity\ContactForm)#412 (23)...
0
votes
1answer
128 views

Contact form - Custom fields are not sending content

I've done a custom contact form with 2 more fields, but I can't get values of those 2 custom fields. I modified contact.module in core to see what are coming from form submit, found my custom fields ...
1
vote
2answers
314 views

Adding a contact form to a page in Drupal 8

I have created a contact form to be used for leads in certain content types, but I am unable to display the form within the content type, either through a block or entity reference. I have attempted ...
4
votes
1answer
315 views

Embed a contact form

Is it possible to take a contact form and embed it into a page.html.twig or node.html.twig file? Or is the form only accessible via its contact/machine_name link?
1
vote
2answers
276 views

Translating contact forms

Is there a way to fully translate the contact message forms in Drupal 8? In the content language screen, the contact message bundle is marked as translation is not supported. Edit: To clarify, I ...
1
vote
1answer
292 views

D8 render a contact form from theme preprocess

I want to render a form in a node view. I made an entity reference to a contact form, then in the preprocess_node I'm trying to get the render array of the contact form. function ...
0
votes
1answer
74 views

How to add tokens in an text-area in the contact module?

In contact module there is an text-area of auto reply in which I want to add tokens to it. Could anyone give solution for above issue.
3
votes
2answers
113 views

Recommended approach for setting up contact management?

I need to develop a contact form that the administrator can reply to and categorize each message (Responded, Transferred, Archived, etc.) received from users. Which would be the best approach for ...
0
votes
0answers
52 views

Contact Form not sending confirmation email

I'm stuck with this. Hope someone can help. I'm working in a Drupal 7 web, using the "Contact forms module". The emails are sent, but there are couple of weird things. If the user is admin, there is ...
1
vote
1answer
98 views

Contact form on maintenance mode page

I'm using Drupal 7 and I wanted users to be able to contact me via email whilst I'm still working on the website. So my plan was to use 'create a contact form', as I don't want to expose my email ...
1
vote
2answers
31 views

Contact form module for different users

I am looking for a contact form module for different users logged in to the website. E.g., 1) a website that has different authors 2) the user clicks on the author's page there is a contact form ...
1
vote
2answers
108 views

How to put conditional multiple recipients in drupal 7 default contact us form

I am working on a multilingual Drupal 7 site using a single contact us form. It has 4 languages. The contact us form is multilingual i.e labels of form fields changes, depending on the language you ...
2
votes
2answers
415 views

Anonymous users can't use personal contact forms

I'm using the core Contact module, with personal contact forms on profile pages. I set both the permissions "Visit user profile" and "Use users' personal contact pages" for anonymous users, but I ...