<p>In Craft 3, Form redirect values must use the <code>hash</code> filter:</p>

<pre><code>&lt;input type="hidden" name="redirect" value="{{ form.redirectUri|hash }}"&gt;
</code></pre>

<p>It's mentioned in passing in the docs <a href="https://docs.craftcms.com/v3/changes-in-craft-3.html#request-params" rel="nofollow noreferrer">here</a>.</p>

<p>Without that <code>hash</code> filter, you'll get redirected to the home page as you are experiencing.</p>

CC BY-SA 4.0
2018-07-25T09:15:59.890Z
The closing of the tag was just a typo yes, putting the hash filter did the trick.
Should have checked out the Craft 3 changes docs a bit more. Not the first issue I ran into regarding a change made for Sprout Forms in Craft 2 to 3
Justin Dekkers
CC BY-SA 4.0
2018-07-30T13:54:57.827Z
Got it. I've removed reference to the typo to as you corrected it in the question too. Just to note it, this isn't a Sprout Forms change, this is a Craft CMS change. In the case forms are not working with Custom HTML, it is a good debugging step to output the form using the `displayForm` tag like you did. If all works via that method, digging into the underlying HTML templates line by line can help start to reveal what might be different.
Ben Parizek
CC BY-SA 4.0
2018-07-25T02:12:41.670Z
2018-07-30T13:49:26.593Z
2018-07-30T13:49:26.593Z
Ben Parizek
<p>All my forms on sprout form won't use the redirect they get assigned via the Form builder. Whenever a form is succesfully submited it redirects to my homepage instead of my thank-you page.</p>

<pre><code>&lt;form class="form__regular" method="post" accept-charset="UTF-8" id="contact-form"&gt;
    {{ getCsrfInput() }}

    &lt;input type="hidden" name="action" value="sprout-forms/entries/save-entry"&gt;
    &lt;input type="hidden" name="handle" value="{{ form.handle }}"&gt;
    &lt;input type="hidden" name="redirect" value="{{ form.redirectUri }}"&gt;
&lt;/form&gt;
</code></pre>

<p>Even if I write the redirect URL manually it keeps redirecting me to the homepage. </p>

<p>The only way I can get the redirect to work is when I let sprout forms render the fields.</p>

<form><plugin-sproutforms><redirect>
Sprout Form redirect after submit not working correctly
# Sprout Form redirect after submit not working correctly

(Asked by: username_0 on 2018-07-24)

All my forms on sprout form won't use the redirect they get assigned via the Form builder. Whenever a form is succesfully submited it redirects to my homepage instead of my thank-you page.

    {{ getCsrfInput() }}

    
    
    


Even if I write the redirect URL manually it keeps redirecting me to the homepage. 
The only way I can get the redirect to work is when I let sprout forms render the fields.

**Tags:** form, plugin-sproutforms, redirect


---

## 1 answers

### Answer by username_1 on 2018-07-25. Score: 2 | Accepted answer

In Craft 3, Form redirect values must use the hash filter:


It's mentioned in passing in the docs here.
Without that hash filter, you'll get redirected to the home page as you are experiencing.

> **Comments:**
> **username_0**: The closing of the tag was just a typo yes, putting the hash filter did the trick. Should have checked out the Craft 3 changes docs a bit more. Not the first issue I ran into regarding a change made for Sprout Forms in Craft 2 to 3  
> **username_1**: Got it. I've removed reference to the typo to as you corrected it in the question too. Just to note it, this isn't a Sprout Forms change, this is a Craft CMS change. In the case forms are not working with Custom HTML, it is a good debugging step to output the form using the `displayForm` tag like you did. If all works via that method, digging into the underlying HTML templates line by line can help start to reveal what might be different.  

---

