Collect POST data from a lightbox without refreshing page?

  • Profile Image
    Asked on February 12, 2012 at 09:21 PM

    I am using a jotform to allow users to create new listings on my site, I have set up a page to collect the POST data and enter it into a database table using php.

    I would like to make the process of creating a listing as seemless as possible, ideally returning to user to the same place they were when they opened the jotform. 

    Currently I am using a lightbox to minimise the number of refreshes necessary to submit a listing, but the lightbox form requires the whole page to refresh to a 'thank you page' destination to collect the POST data, from here I can set an auto refresh back to the homepage but not where the user started from.


    1) Is there a way I can collect the url of the page that the user first opened the lightbox/jotform on so as to pass it along as a variable, and ultimately return the user to their starting location once the POST data is collected?

    2) Is there a way to collect POST data / form submissions without using a thankyou page? So that the lightbox just closes on submission.

    3) Any other ideas?

  • Profile Image
    Answered on February 13, 2012 at 08:44 AM

    I'm not sure if this is possible since running a lightbox script is completely dependent on JotForm's server for it to load.

    Although it is possible to redirect back the user to the previous page by adding a hidden field in your lightbox script and have it prepopulated with the value of the page or the URL or the page.  By doing this, it will also submit the value of the URL.  You can then get this in your thank-you page and then use it for redirection so that the viewer will then be sent back to the page where he was when he filled up your lightbox form.

    You can check out our Seyhun's last post for the code instructions on how to prepopulate your lightbox code from this thread:

    Please let us know if you need further assistance.


  • Profile Image
    Answered on July 04, 2013 at 07:11 PM

    We are happy to announce that we have released Jotform Webhooks,  this feature would replace Send Post Data + Custom URL Thank You Page workaround in order to help you transfer forms data to your own database using your own script codes.

    To know more about Jotform Webhooks, please click here.


    Thank you for using JotForm. :)