<blockquote>
  <p>Without an entry with slug contact/thanks then the page just returns an error Variable "entry" does not exist. But still it doesn't draw any content from the entry. </p>
</blockquote>

<p>You do not need to create an entry for the Thanks page - in most cases it is easier to just add the actual text to your template file. If you do want to make it editable, then create a Single Entry, name it whatever you want, then go to Settings > Sections > <em>yourSection</em> and edit the uri and path variables. The URI should be contact/thanks, and the template path would likely be something like thanks.html</p>

CC BY-SA 4.0
2019-06-06T11:36:37.633Z
this issue fix it but i want to ask again becuse little bit confuse why not receive mail in mailtrap,after sucess message.
Mukesh Kumar
CC BY-SA 4.0
2018-12-09T22:55:31.440Z
2018-12-09T22:55:31.440Z
Roi Agneta
<p>I had the same problem and I found out - <strong>it is</strong> necessary to create a route.</p>
<p>You have two options for that:</p>
<ol>
<li>Entry (single) with slug</li>
<li>Custom Route</li>
</ol>
<p>Thats because redirectInput() redirect to an url. But without a route - you just can not access the template tree. Thats the whole point of a routing system.</p>
<p>I would love to see a custom route created (and configurable) by this plugin.
But ok, I have it now.</p>

CC BY-SA 4.0
2020-09-03T05:18:40.460Z
2020-09-03T05:18:40.460Z
Slowwie
<blockquote>
  <p>I would assume I need to make a section/entry for the contact/thanks page?</p>
</blockquote>

<p>Not necessarily.  You could just make a <code>templates/contact/thanks.html</code> file and that would resolve.  You can also change that value to whatever you want:</p>

<pre><code>{{ redirectInput('neato') }}
</code></pre>

<p>And you'd put a <code>templates/neato.html</code> file in place it would load.</p>

<blockquote>
  <p>Do I need to create a page for contact-form/send too?</p>
</blockquote>

<p>I'm not familiar with the Contact Form Extensions plugin, but if the submissions are making it into the database, then that <code>contact-form/send</code> controller endpoint is probably being hit properly.</p>

<p>If your email settings are working properly under Settings->Email in the Control Panel (you can test with the "Test" button), then there can be other reasons why emails aren't being delivered you could check:</p>

<p><a href="https://craftcms.com/guides/troubleshooting-email-errors#dealing-with-email-delivery-issues" rel="nofollow noreferrer">https://craftcms.com/guides/troubleshooting-email-errors#dealing-with-email-delivery-issues</a></p>

<p><a href="https://craftcms.com/guides/why-doesnt-craft-send-emails" rel="nofollow noreferrer">https://craftcms.com/guides/why-doesnt-craft-send-emails</a></p>

CC BY-SA 4.0
2018-11-09T01:23:56.077Z
Hmm, I'm obviously missing something. Without an entry with slug contact/thanks then the page just returns an error 

Variable "entry" does not exist.

But still it doesn't draw any content from the entry. Whether I use the default template or one specific to that page.
WWD
CC BY-SA 4.0
2018-11-09T01:29:20.363Z
Also, when the contact form is submitted the first time, it also shows "Variable "entry" does not exist." for the first entry item in the (default/root) template. The page URL is /contact/ not contact/thanks. Reloading the page takes me to the blank, but correctly templated page with url contact/thanks. Only globals are populated in the template. A submission is recorded for both the first page load and the Confused.
WWD
CC BY-SA 4.0
2020-09-03T05:10:57.680Z
I have the same issue - without an entry with slug - I get an template not found error.
Slowwie
CC BY-SA 4.0
2018-11-09T00:43:39.917Z
2018-11-09T00:43:39.917Z
Brad Bell
<p>I am <em>just</em> getting to grips with Craft CMS and am finding the Contact Form plugin tricky to use. I have built a reasonable site structure, figured how fields, sections, etc work at a relatively basic level and have produced a one-for-all template so far in the templates/ root folder. But the form eludes me.</p>

<p>I have added the contact form example from <a href="https://github.com/craftcms/contact-form" rel="nofollow noreferrer">https://github.com/craftcms/contact-form</a> to the main template at present, and this shows on my /contact/ page. However, the submission of the form returns an error as follows:  </p>

<p><em>Template not found: contact/thanks</em></p>

<p>I would assume I need to make a section/entry for the contact/thanks page? So I have now done that. The form submits but just goes to a blank page at contact/thanks even though I have created content on that entry. It's not drawing any of the data items specified in the Twig template. </p>

<p>It also <em>does not</em> send an email. I have implemented and tested the Settings > Email webserver details successfully. But all submissions are being collated in the "Form Submissions" area (Contat Form Extensions plugin).</p>

<p>I note that the form has no action, but the hidden field below exists:</p>

<pre><code>&lt;input type="hidden" name="action" value="contact-form/send"&gt;
</code></pre>

<p>Do I need to create a page for <strong>contact-form/send</strong> too? I have clearly made the naive assumption that the plugin would sort the sendmail part but some action is required on my part.</p>

<p>Sorry, I'm a noob. Guidance appreciated. </p>

<templating><entries><plugin-contactform><plugin-contactformextensions>
Contact Form Setup on Craft CMS
# Contact Form Setup on Craft CMS

(Asked by: username_0 on 2018-11-09)

I am just getting to grips with Craft CMS and am finding the Contact Form plugin tricky to use. I have built a reasonable site structure, figured how fields, sections, etc work at a relatively basic level and have produced a one-for-all template so far in the templates/ root folder. But the form eludes me.
I have added the contact form example from https://github.com/craftcms/contact-form to the main template at present, and this shows on my /contact/ page. However, the submission of the form returns an error as follows:  
Template not found: contact/thanks
I would assume I need to make a section/entry for the contact/thanks page? So I have now done that. The form submits but just goes to a blank page at contact/thanks even though I have created content on that entry. It's not drawing any of the data items specified in the Twig template. 
It also does not send an email. I have implemented and tested the Settings > Email webserver details successfully. But all submissions are being collated in the "Form Submissions" area (Contat Form Extensions plugin).
I note that the form has no action, but the hidden field below exists:


Do I need to create a page for contact-form/send too? I have clearly made the naive assumption that the plugin would sort the sendmail part but some action is required on my part.
Sorry, I'm a noob. Guidance appreciated.

**Tags:** templating, entries, plugin-contactform, plugin-contactformextensions

---

## 3 answers

### Answer by username_1 on 2018-12-09. Score: 2

> Without an entry with slug contact/thanks then the page just returns an error Variable "entry" does not exist. But still it doesn't draw any content from the entry.

You do not need to create an entry for the Thanks page - in most cases it is easier to just add the actual text to your template file. If you do want to make it editable, then create a Single Entry, name it whatever you want, then go to Settings > Sections > *yourSection* and edit the uri and path variables. The URI should be contact/thanks, and the template path would likely be something like thanks.html

> **Comments:**
> **username_2**: this issue fix it but i want to ask again becuse little bit confuse why not receive mail in mailtrap,after sucess message.  

---

### Answer by username_3 on 2020-09-03. Score: 1

I had the same problem and I found out - **it is** necessary to create a route.

You have two options for that:

1. Entry (single) with slug
2. Custom Route

Thats because redirectInput() redirect to an url. But without a route - you just can not access the template tree. Thats the whole point of a routing system.

I would love to see a custom route created (and configurable) by this plugin.
But ok, I have it now.


---

### Answer by username_4 on 2018-11-09. Score: 0

I would assume I need to make a section/entry for the contact/thanks page?

Not necessarily.  You could just make a templates/contact/thanks.html file and that would resolve.  You can also change that value to whatever you want:
{{ redirectInput('neato') }}

And you'd put a templates/neato.html file in place it would load.

Do I need to create a page for contact-form/send too?

I'm not familiar with the Contact Form Extensions plugin, but if the submissions are making it into the database, then that contact-form/send controller endpoint is probably being hit properly.
If your email settings are working properly under Settings->Email in the Control Panel (you can test with the "Test" button), then there can be other reasons why emails aren't being delivered you could check:
https://craftcms.com/guides/troubleshooting-email-errors#dealing-with-email-delivery-issues
https://craftcms.com/guides/why-doesnt-craft-send-emails

> **Comments:**
> **username_0**: Hmm, I'm obviously missing something. Without an entry with slug contact/thanks then the page just returns an error   Variable "entry" does not exist.  But still it doesn't draw any content from the entry. Whether I use the default template or one specific to that page.  
> **username_0**: Also, when the contact form is submitted the first time, it also shows "Variable "entry" does not exist." for the first entry item in the (default/root) template. The page URL is /contact/ not contact/thanks. Reloading the page takes me to the blank, but correctly templated page with url contact/thanks. Only globals are populated in the template. A submission is recorded for both the first page load and the Confused.  
> **username_3**: I have the same issue - without an entry with slug - I get an template not found error.  

---

