How do I return to original form calling page from the Thank You page?

  • aprpac
    Asked on March 28, 2015 at 11:12 AM

     I am linking to my form from within an eBay listing using:

    <p><a href="https://secure.jotformeu.com/form/508564712*****" target="_self">Click here to enter your personalisation details</a></p>

    (Specific form details above obscured *****). The "_self" parameter keeping the form within the same window/tab.

    After I have filled the form and Submitted it the Thank You page opens as expected.

    To manually get back to the calling eBay listing I click the browser Back button twice. I would like to be able to put a "Return to eBay" button under my custom text on the Thank You page that programatically goes back 2 pages to the eBay listing - how can I do this?

    Note - I can't use a direct URL link as this form is used in a template for multiple eBay listings and hence the URL is variable.

    Thanks in anticipation

    Paul

  • raul
    Replied on March 28, 2015 at 1:32 PM

    Thank you for contacting us.

    Since you cannot use the normal thank you page URL redirection, you would need to create your own custom PHP page that will serve as the thank you page and use JavaScript to make the "Return to ebay" link work correctly.

    For example, on this page: https://shots.jotform.com/raul/542455/index.html I've embedded a cloned version of your form. If you submit it the custom thank you page will be displayed and when you click on the "Return to ebay" link you'll be redirected back to the page where the form is embedded.

    To accomplish this as mentioned, I used a custom PHP thank you page and also enabled the POST data in the form to retrieve the name and the id values.

    How do I return to original form calling page from the Thank You page? Image 1 Screenshot 20

    Give it a try and let us know if this works for you.

    I've posted here: http://pastebin.com/iEtVN7hv the source code of the thank you page and you can also view the source code of the index.html if you want to.

    If you have further questions, please let us know.
    Thank you.

  • aprpac
    Replied on March 30, 2015 at 10:34 AM

    Hi Raul,

     
    Thanks for your assistance. To test I have l embedded a link to your version of my test form (https://shots.jotform.com/raul/542455/index.html) into my test eBay listing (http://www.ebay.co.uk/itm/171734597199?) if you scroll down to the Description section you will see a link to your form ("Click here to enter your personalisation details”). If you then click that link, complete the form & Submit it, you arrive at your new version of the Thank You page.
     
    So far so good - however the “Return to eBay” link still does not work!
     
    What is going wrong? and how can this be fixed?
     
    Thanks in anticipation.
    Paul
  • Ashwin JotForm Support
    Replied on March 30, 2015 at 12:29 PM

    Hello Paul,

    Upon checking the source code of the thank you page, it seem to have the following code:

    <a href="" onDISABLEDclick="javascriptDISABLED:history.back(-2);">Return to eBay</a></div>

    I would suggest you to use the following code and see if that solves your problem:

    <a href="javascriptDISABLED:history.back(-2);">Return to eBay</a></div>

     

    Please test the following form and see if this works as expected. The thank URL I have changed to the following URL:  https://shots.jotform.com/ashwin/542455/thankyou.php 

    Hope this helps.

    Do get back to us if the issue persists.

    Thank you!