How to prefill form fields with student ID?

  • hmaydak
    Asked on April 7, 2025 at 2:59 PM

    We're embedding Jotforms onto our Wordpress pages - users will log in, then work through forms for example, to answer questions about a student (they have to enter the student ID and name); I want to pre-fill that student ID and name on each form they then select to complete.

    Example:

    1. click on 'New Assessment' page which opens a new assessment Jotform to enter student info (ID, name, etc.) and a few other fields.
    2. hit submit and go to 'areas of concern' wordpress page which has buttons that lead to additional Jotforms.
    3. I would like to pre-fill/populate the student ID and name on every page in Wordpress (if possible - but this may be a Wordpress issue) and form. I've tried the prefill from form and table prefill options with no luck (maybe I'm missing a step?).
    4. when they finish all the forms with that student ID, we hope to then have a PDF created from all the forms they completed


  • Raymond JotForm Support
    Replied on April 8, 2025 at 1:48 AM

    Hi Heather,

    Thanks for reaching out to Jotform Support. We have a Spreadsheet to Form Widget that you can use to import your data. Let me show you how to use it:

    1. Create a spreadsheet with your data structured like you see below. Make sure that the column names in the spreadsheet match the field names on the form, and include a unique column, like an ID, so the data can be distinguished.

    How to prefill form fields with student ID? Image 1 Screenshot 50

    2. In Form Builder, click on the Add Form Element menu on the left side of the page.

    3. Click on the Widgets tab, search for the Spreadsheet to Form widget and add it to your form.

    4. In the menu on the right side of the page, upload your data file. (You can simply drag & drop your excel file to the Upload File area.) 

    How to prefill form fields with student ID? Image 2 Screenshot 61

    5. Then, click on the Downward Arrow icon in the Access Code Column option and select the unique column.

    6. You can also customize texts used in the widget. After you complete everything, click on the Update Widget button at the bottom right of the menu.

    How to prefill form fields with student ID? Image 3 Screenshot 72 Now, when people fill out your form and enter the unique code from the spreadsheet, the corresponding fields will automatically populate when they click Auto Complete Fields. Check out my screencast below to see how it works:

    How to prefill form fields with student ID? Image 4 Screenshot 83

    As for your other question, I've moved that to a new thread. You can check that out here.

    Give it a try and let us know if you need any help.

  • hmaydak
    Replied on April 8, 2025 at 7:20 PM

    We're not importing from a spreadsheet. Users will add the data on the Jotform, then move through subsequent Jotforms, so this won't work.

  • Mary JotForm Support
    Replied on April 9, 2025 at 3:36 AM

    Hi Heather,

    Will you be prefilling the succeeding forms with the Student ID and Name that was entered from the first form? If yes, you need to embed the prefilled form URL to your webpage. You can replace the default src attribute of the iframe embed with the prefilled link you want to use. The enclosed part is the src of the iframe embed that you will replace with the prefilled link.

    How to prefill form fields with student ID? Image 1 Screenshot 20

    Give it a try and let us know how it goes.

Your Answer