What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How can I 'pre-fill' form fields?

    Asked by MatthewHomer on November 19, 2015 at 08:53 AM

    I am using JotForm to collect door to door household data. I want certain fields (road name, for example) to be prefilled by the surveyor, so they don't have to add this data at every household.

    Can I do this, or is there a field that defaults to previously used entries, for example?

    Thanks.

    Matthew.

    pre-fill prefill prefilled survery form prepopulate field names name attribute
  • Profile Image
    JotForm Support

    Answered by Mike_G on November 19, 2015 at 11:30 AM

    If I understand your concern correctly, you would like to have a form, that will be filled up by a surveyor. The surveyor's details will be entered once for the first survey entry and the form will be prefilled with the details of the surveyor for the second, third, fourth and so on... entries, is that correct? Unfortunately, we don't have a field that can remember your entry from a previously submitted form but, there is a workaround.

    I have created a sample form and here's how it works:

    First, the surveyor will enter his details for his first survey entry. Upon submitting the form, the surveyor will get a confirmation message through the Thank-You page. Aside from the confirmation message, the surveyor will have the option to make another survey entry with his/her details (pre-filled on the form) or he/she can also choose to start from scratch.

    Here's the Sample Form URL: https://form.jotform.com/53224421934955

    Note: On the First entry, the surveyor is required to enter his/her information before he proceeds with the first survey.

    I suggest you clone the sample form and make a test submission.

    Here's how it's done.

    Suppose you already have a survey form.

    Once you have the form already, you can now create the link that will redirect surveyors to the form with the details that they have entered the first time.

    What you need is the link to the form or the Form URL. 

    Then, the name attribute of each input field the surveyor needs to fill in with his/her details.

    This guide will be very helpful for you to learn how to get the name of the fields: Prepopulating-fields-to-your-JotForm-via-URL-parameters

    And lastly, you need to have the {fieldNames}

    Here's a guide that can also help you get the {fieldNames}: How-to-find-Field-IDs-Names

    Once you have those, you can now construct the link. 

    After you have constructed the link, you can now create your Thank-You page.

    You can also make the form where once it is submitted it will redirect the surveryor to the same form but this time it's pre-filled with the surveyor's details. But again, on the first entry, the surveyor is required to enter his/her information before he proceeds with the first survey.

    Here's another Sample form for that: https://form.jotform.com/53224614908960

    Here's how you can do it: 

    I hope I was able to get to understand your request. Should you have any questions with any of the instructions or steps given above, please feel free to let us know and we will be glad to help you.