<p>Sure, works just the same. Just change method="GET" to method="POST".</p>

<p>You can acquire the POST values by using <code>craft()-&gt;request-&gt;getPost('yourPostName')</code> in your plugin controller or by using <code>{{ craft.request.getPost('yourPostName') }}</code> in a template.</p>

CC BY-SA 3.0
2015-03-16T17:07:20.250Z
Ehh... I tried this and template stopped working. That's why I made this post. What could I have done wrong? Hehe :)
naboovalley
CC BY-SA 3.0
2015-03-16T17:09:04.873Z
Could you post the part of your template responsible for this?
Paul
CC BY-SA 3.0
2015-03-16T10:41:49.920Z
2015-03-16T10:41:49.920Z
Paul
<p>In the documentation "search form" example you can run a GET request to a specific template and if you use a Plugin you can run a POST request to a specific controller action.</p>

<p>But is it possible to run a POST request directly to a template?</p>

<templating>
Can I POST to a template?
# Can I POST to a template?

(Asked by: username_0 on 2015-03-16)

In the documentation "search form" example you can run a GET request to a specific template and if you use a Plugin you can run a POST request to a specific controller action.

But is it possible to run a POST request directly to a template?

**Tags:** templating

---

## 1 answers

### Answer by username_1 on 2015-03-16. Score: 2

Sure, works just the same. Just change method="GET" to method="POST".

You can acquire the POST values by using `craft()->request->getPost('yourPostName')` in your plugin controller or by using `{{ craft.request.getPost('yourPostName') }}` in a template.

> **Comments:**
> **username_0**: Ehh... I tried this and template stopped working. That's why I made this post. What could I have done wrong? Hehe :)  
> **username_1**: Could you post the part of your template responsible for this?  

---

