Skip to main content
I have the Web-to-Lead form setup on my website, but I was wondering how to stop it from redirecting after a customer submits the form.

 

Here's the code:

 

<input type=hidden name="retURL" value="http://www.apple.com">

 

I would like the customer to stay on the page after submit, but can't figure out how to disable this.

 

If I take the line out, the page after submit will:

 

Stay for a moment, then redirect to https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8 and then come back to the same page.

 

If I put an "#" in the value so the code would read:

 

<input type=hidden name="retURL" value="#">

 

the page after submit will go to:

 

https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8

 

What is the solution to this?
7 answers
  1. May 4, 2013, 4:23 AM
    Hi Gunner,

     

    Is there any specific reason why you would want the user to stay on the same page?

     

    One reason why users redirect the users is to acknowledge that the information has been posted to Salesforce. If you really need to return the user to the same page, I would just suggest putting a URL parameter that would indicate that the user has already submitted the page and then a message would also appear.

     

    Here is an example of the form.

     

    http://www.mydomain.com/contactus

     

    You could make the return URL to something like this:

     

    http://www.mydomain.com/contactus?submitted=1

     

    And then in the contact form, if the value of the submitted is 1, show the message to the user so that they will know that the information has already been submitted.

     

    Does this work for you?
0/9000