<blockquote>
  <p>Why does getBodyParam('email') always return empty here?</p>
</blockquote>

<p>Because that method is looking for data in POST, and after the redirect has happened, it's a new request, and POST data is lost.</p>

<p>If you want to do what you're looking for, the easiest way is to pass the email address along as a query string param (i.e. <code>?email=foo@bar.com</code>), then the template can do <code>craft.app.request.getQueryParam('email')</code>.</p>

CC BY-SA 4.0
2020-04-26T12:01:10.853Z
Thanks Brad. Is that possible with just twig and the standard registration form, or are you thinking JS or a plugin to capture the email value?
James
CC BY-SA 4.0
2020-04-26T03:30:24.870Z
2020-04-26T03:30:24.870Z
Brad Bell
<p>I have a user registration form setup to redirect to another template on submit. That template then includes the following:</p>

<pre><code>{% set email = craft.app.request.getBodyParam('email') -%}
&lt;p&gt;Thank you for registering. An email has been sent to {{ email }}…
</code></pre>

<p>Why does <code>getBodyParam('email')</code> always return empty here? <code>getBodyParams()</code> also returns an empty array.</p>

<craft3>
Get email address from registration form
# Get email address from registration form

(Asked by: username_0 on 2020-04-25)

I have a user registration form setup to redirect to another template on submit. That template then includes the following:
{% set email = craft.app.request.getBodyParam('email') -%}
Thank you for registering. An email has been sent to {{ email }}…

Why does getBodyParam('email') always return empty here? getBodyParams() also returns an empty array.

**Tags:** craft3

---

## 1 answers

### Answer by username_1 on 2020-04-26. Score: 1 | Accepted answer

> Why does getBodyParam('email') always return empty here?

Because that method is looking for data in POST, and after the redirect has happened, it's a new request, and POST data is lost.

If you want to do what you're looking for, the easiest way is to pass the email address along as a query string param (i.e. `?email=foo@bar.com`), then the template can do `craft.app.request.getQueryParam('email')`.

> **Comments:**
> **username_0**: Thanks Brad. Is that possible with just twig and the standard registration form, or are you thinking JS or a plugin to capture the email value?  

---

