When customer fills in the form, to be able to view his answers on his unique login page after submission, in order to make edits

  • Profile Image
    Asked on April 13, 2016 at 08:14 AM

    We are working on website to have a unique login section for each client. Each client will login and fill a form containing his personal info, contact info and info relating specifically to our service. In other words, we will collect data for each client and we want the info to be stored on his login section after submitting the form, not to have the form reseted. So if the client wants to change his contract address, to be able to see his previous submission and make edits accordingly. We dont have visuals of our website at the moment, as it is work in progress. Thanks. 

  • Profile Image
    Answered on April 13, 2016 at 11:25 AM

    Please note that we do not allow JotForm forms to be used as a log in page. This is against our terms of use.

    If you will just use the form to collect some basic information to your users, then that is possible as long as it doesn't act as a log in page. Now regarding your concern. There are a couple of ways to do this.

    Method 1:

    1. When your users log in to your website, you can load the edit link of the submission, using an iframe tag HTML element. Here's a link about the iframe tag: http://www.w3schools.com/tags/tag_iframe.asp 


    2. The edit link is like this:


    The last part of the link is the submission ID. 


    3. To embed it in your website you can do it like this:

    <iframe src="https://www.jotform.com/edit/336368556112213006" width="500" height="500"></iframe>

    However, the problem on this is the submission ID, we cannot embed ALL the edit links like that, so we need to find a way to store and load the submission ID in your own database.

    4. You can do that by sending the form data using POST and save the submission ID in your MySQL database (or save all the submission data if you want). You can do that by following this guide: https://www.jotform.com/help/126-How-to-send-Submissions-to-Your-MySQL-Database-Using-PHP 


    5. You now have the submission data in your own database. You will then need to create a custom script to associate a submission ID to your user's account. So when they log in, you can simply populate the embedded edit link with the submission ID. It will be something like this:

    I'm basically getting the submission ID in our database, assign it as a PHP variable and pass it in the iframe src attribute with the edit link of JotForm. Your user now can update his/her submission. 


    Method 2:

    If you are familiar with API, then you can simple fetch the submission data and update is using API. Here's our document for this: http://api.jotform.com/ 

    Here's the specific API call to get the submission's data: http://api.jotform.com/docs/#submission-id 

    Here's the specific API call to update a submission: http://api.jotform.com/docs/#post-submission-id 


    I hope those suggestion will help.