Route to Success Link is not working on V13

Hello,
I’m new to frappe cloud.
I’m using frappe v13. I have created a web form. After the submission of form, I wanna redirect to the web page link.
There’s a section called ‘Actions’ on the Web Form document where we can specify the Success URL (this is the url that the Web Form redirects to upon successful submission). I tried that, but the redirect function wasn’t working.
If there is any other way to do it please let me know.
I’m really stuck on this.

Thanks,
A Jolaniya

1 Like

Are you logged in as any user? The description of the Success URL field says, Go to this URL after completing the form (only for Guest users). So it only works for Guest Users.

You can achieve this using javascript. In your webform go to the Client Script section. Add the following code there.

frappe.web_form.after_save = () => {
    window.location.href = "/url-of-the-page";
  }
5 Likes

Hey @pateljannat,

Thanks for your reply. For that may be we need to remove the Login Required feature and if we remove that then Route to Success Link option is also removed.

Thanks,
A Jolaniya

The code snippet that i shared would work even if the user is logged in.

Hey @pateljannat thanks it works. Thank you so much.

1 Like

Hello,

Can we change the redirecting time because by default it takes 5 seconds so?

Thanks in advance

Add a setTimeOut