Load data onto forms from MySQL database

  • Profile Image
    ConnectCareAustralia
    Asked on November 07, 2021 at 10:47 PM

    Hi there.

    I have been successful in pushing my data from Jotforms to a MySQL database but now I want to load some of that data back to a Jotform to continue filling in further data. Is this possible?

    My workflow is to have a user fill a form and have their submission to to a MySQL table. This is working well.

    Next stage is to call up some of that data to another form and have the next-level user fill in some more fields, then have that data pushed back to the same record in the MySQL table.

    Final stage is for the highest-level user to call up some of the data to another form and fill in the final fields to close off the job.

    In Jotform I have to have the data split into 3 forms because I am passing the data from one form to the next via a URL link on the confirmation email. These URLs are very long because there are a lot of fields so I have to split them to 2 URLs, meaning 2 forms after the first form.

    So is there some way to pull the data up onto these subsequent 2 forms from MySQL?

    Form1: https://form.jotform.com/213061830810848

    Form2: https://form.jotform.com/212991451141855

    Form3: https://form.jotform.com/213070559291859

    Thank you.

  • Profile Image
    gerardw
    Answered on November 08, 2021 at 03:29 AM

    Unfortunately, you cannot pull data from your database to your form. Here are a couple of workarounds you may want to check:

    1.) Query the necessary data from your database and export them to an Excel/CSV file. After that, upload the file to a Spreadsheet To Form widget added to the form. This works like a database query tool, but instead, it uses the Excel file that you uploaded.

    GUIDE: How-to-Use-the-Spreadsheet-to-Form-Widget

    2.) Or you can copy the form's source code and embed it to your own custom page. Add some custom PHP scripts there to pull data from your database and prepopulate the embedded form with it.