Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-26T12:01:10.853Z
Answers.Text: 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?
Answers.UserDisplayName: James
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-26T03:30:24.870Z
Answers.LastActivityDate: 2020-04-26T03:30:24.870Z
Answers.UserDisplayName: Brad Bell
Body: <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>
  
Tags: <craft3>
Title: Get email address from registration form
ThreadText: # 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') -%}
  <p>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 username_1. Is that possible with just twig and the standard registration form, or are you thinking JS or a plugin to capture the email value?  
  
  ---
  
  