<p>Not possible – any input values added to your profile editing form (such as <code>test</code> in your case) will be included in the POST request to the <a href="https://craftcms.com/classreference/controllers/UsersController#actionSaveUser-detail" rel="nofollow"><code>users/saveUser</code></a> controller action, but they won't actually be included in the redirect request back to the page (or to whatever URL is in your form's hidden <code>redirect</code> input).</p>

<p>As a workaround you can always check for the Flash notice that the UsersController sets after the user is successfully saved:</p>

<pre><code>{% if craft.session.getFlash('notice') == 'User saved.'|t %}
    &lt;p&gt;Success message!&lt;/p&gt;
{% endif %}
</code></pre>

CC BY-SA 3.0
2016-06-21T23:53:48.497Z
Wow, awesome! Thank you so much! That worked and was really helpful!
Ryan
CC BY-SA 3.0
2016-06-21T19:58:20.253Z
2016-06-21T19:58:20.253Z
Mats Mikkel Rummelhoff
<p>After a logged-in user updates their profile on the front end, I'd like to redirect them to the same page but show a success message. I believe I can do this with <code>craft.request.getPost()</code> but it's not working for me.  Code below:</p>

<pre><code>&lt;input type="hidden" name="test" value="xyz"&gt;
</code></pre>

<p>and then </p>

<pre><code>{% set success = craft.request.getPost('test') %}
{% if success %}
    Success message
{% endif %}
</code></pre>

<p>I can see "test" in my dev tools network tab but can't seem to access it.</p>

<form><frontend><user-profile>
get post data after submitting User Profile Form for success message
# get post data after submitting User Profile Form for success message

(Asked by: username_0 on 2016-06-21)

After a logged-in user updates their profile on the front end, I'd like to redirect them to the same page but show a success message. I believe I can do this with craft.request.getPost() but it's not working for me.  Code below:


and then 
{% set success = craft.request.getPost('test') %}
{% if success %}
    Success message
{% endif %}

I can see "test" in my dev tools network tab but can't seem to access it.

**Tags:** form, frontend, user-profile


---

## 1 answers

### Answer by username_1 on 2016-06-21. Score: 4 | Accepted answer

Not possible – any input values added to your profile editing form (such as test in your case) will be included in the POST request to the users/saveUser controller action, but they won't actually be included in the redirect request back to the page (or to whatever URL is in your form's hidden redirect input).
As a workaround you can always check for the Flash notice that the UsersController sets after the user is successfully saved:
{% if craft.session.getFlash('notice') == 'User saved.'|t %}
    Success message!
{% endif %}

> **Comments:**
> **username_0**: Wow, awesome! Thank you so much! That worked and was really helpful!  

---

