User Guide

 

Prepopulating Fields to Your JotForm via URL Parameters

Prepopulating Fields to Your JotForm via URL Parameters

Update:

Instead of following this guide you can also use this app to generate a prepopulated form URL http://prepopulate.jotform.io/.

------------------------------------------------------------------------------------------------------

Let's say you have a link or a page that should automatically fill in values to your JotForm and you want your form to be prepopulated after being clicked via URL:
 
Example:
 
Form without prepopulated fields:
 
Form with prepopulated name fields:
 

View your form's source to identify each form field name you wish to be prepopulated.  

1. Click the "Preview" button.

2. Click the "OPEN IN NEW TAB" button.

 

3. Right click on the live form then click "View Page Source" or "Inspect"


Or you can use Browser Inspect Element feature so you can easily identify field names. Check this screenshot.


For text boxes, text area, radio buttons and drop-down menus:

Assuming we are viewing the page source of the form above, let's identify the name of the text boxes first. Field names can be found under the name attribute, e.g. name="q5_fullName[first]"In order to use it on the URL parameter, you only have to copy the name after the underscore symbol "_". (see highlighted code below) 
 
Example:

<input class="form-textbox" type="text" size="10" name="q5_fullName[first]" id="first_5">

<input class="form-textbox" type="text" size="15" name="q5_fullName[last]" id="last_5">

Now we're able to get the names of each field, include them in the URL, remember to put a question mark "?" after the URL to declare that we are submitting parameters, then comes the name followed by equal sign "=", then the value.

Example:
https://form.jotform.com/53533976064967??fullName[first]=John

If you wish to add more parameters, these are to be separated by "&" sign. 

Example:
https://form.jotform.com/53533976064967??fullName[first]=John&fullName[last]=Doe

For Checkboxes:

Identify each checkbox value first.  On our sample form, we have 5 check boxes.  All of these check boxes has the same name, pleasechoose[]

Here's an example check box field for the option "Wood", noticed the name attribute:

<input type="checkbox" class="form-checkbox" id="input_13_1" name="q13_pleaseChoose[]>" value="Wood">

To prepopulate that checkbox via URL parameter:

1. First, find the value of its name attribute in the HTML source code.

2. Copy the name after the underscore symbol "_" e.g  pleaseChoose[] but remove the "[]" on it.

3. Copy the value e.g. Wood

To be able to select more than one, you need to separate each value with a comma.  

Example:

https://form.jotform.com/53533976064967??pleaseChoose=Wood,Gold,Metal,Soft drinks,Cheese cake

 

If you have questions about this guide, feel free to leave your comments below.

Send Comment

70 Comments...

See all comments
  • tcornack

    I would like to repopulate a drop down field from a google spreadsheet. The form would need to get 20 or so single names into a single name Drop Down field, our therapist then would chose the client from the drop down for billing. The google sheet is filtered and sorted.

  • taxi88test

    Hi guys, you should really add the correct syntax for single sperarted fields like Full Name to the tutorial
    "name[first]={name:first}&name[last]={name:last}"
    There's really no point in anybody ele wasting their time trying to find that out...

  • jrittenhouse

    I am attempting to pre-populate fields on this form: https://form.jotformpro.com/72183998729981.

    I need to pre-populate the radio buttons for different courses. Is it the collapse function that I'm using that's breaking the pre-populate links, or the long field values with spaces and other punctuation?

  • Neciamarie

    Can you also pass an image to the form?

  • chatbotmaker

    How to use in editing the form?
    In editing the information is always replaced by the value of the database

  • XLAutomation

    I have a PayPal form that I want to set to a particular payment plan option when the user arrives. I have tried to use the steps above but can't seem to get it working....can you help please.

    Here is the Jotform
    https://form.jotformpro.com/71556656032962

    I want to set each of the options for Share Trade Tracker Options

  • EnhanceHomes

    Every time I use this now, the form hangs at point of submission. My link is: https://goo.gl/rPPl86

    Aury has been looking at this also.

  • sandboxlogistics

    One thing I've noticed is if for example I have a full name (i.e.. bla_name[first] and bla_name[last]) that I cannot pull the field values separately when generating the form url on a save submission because the variable name is actually {name} and it has the full name .. therefore a link like ?name[first]={name}&name[last]={name} would pre-populate both fields with the full name... You would think this would work but it doesn't:
    ?name[first]={name[first]}&name[last]={name[last]}

  • adam16ster

    How do I prepopulate an email input if it doesn't contain a name attribute? All I see available are id, placeholder, size and type. Please help.

  • Eric

    I'm trying to prepopulate the distributors ID fileld of a website but not having any luck...

    Here is the website:https://www.senegence.com/senegenceweb/CustomerDirectOrdering/Login.aspx?firsttimecustomers:[mydistributor'sid]=231621

    Can someone assist? The ID should be 231621

  • EnhanceHomes

    Hi,

    Is it possible to revisit a previous prepopulated form and change the values?

    If so will these change for everyone with the current link or would a new link need to be generated?

  • cara membersihkan jerawat

    thank you,,

  • jae

    how can i populate a product model number and product name of which the page they are on? There will be a form link in which once they click it will take them to the form page

  • dave

    I am having the same issue

  • GCACjournalist

    The app doesn't appear to be working. I clicked the "Choose Form" button, selected my form, and clicked "Continue." The app did not proceed to the next step. Please advise.

  • novohouston

    Prepop is not working. When I choose the form it takes me right back to choose form.

  • okholistics

    I am setting up a payment form and trying to populate the price field with an amount ( $xx)

    However, it doesn't seem to be working. Is this not possible?

  • jdt3901

    1. How do you prefill hidden fields? 2. Google Analytics has a cool URL builder, and I'm trying to fill some hidden fields on my form with the tags. Is that possible?

  • Norton coupon codes

    awesome post.

  • ilgideon

    How do you fill the address fields ?

    Thanks,
    Mike

  • mijot

    I have this test form I'm playing with: http://form.jotform.ca/form/60885639075266.
    I need the form to "remember" the selection for the subsequent submissions.
    I'm trying to pre-populate the form from the thank you page using the field variables like this:












    It's not working and I'm not sure how to pass the value to the form on next load.
    Is this possible?

    btw, the form is embedded.

  • antonvalle

    Hmm, I can't seem to get this to work when I'm embedding the form. This works: https://form.jotformeu.com/60525206402342??kurssinNimi=Haloo%20media!%20Tehoa%20mediasuhteisiin%2012.4.2016%20klo%209-16

    But embedding this gives me an empty form: https://form.jotformeu.com/jsform/60525206402342??kurssinNimi=Haloo%20media!%20Tehoa%20mediasuhteisiin%2012.4.2016%20klo%209-16

  • robinconn

    I am trying to prepopulate a price in a Stripe field. The price I have stored in the form is $90.00. Here is the form.

    http://form.jotform.us/form/60906513799163?

    When I look at the HTML with the price selected, the line of code for the price I want to change is:

    90.00

    I want to use a value I have stored in a database to fill the "Price" on the form via a Querystring URL. I can't figure out the correct format.


  • Foltved

    Hi Jotform

    Trying to prepopulate a field with a value that consists of a whole number and some decimals eg. 7,97 - but how do I get the comma inserted via the URL parameter?


  • SRWproducts

    Can we have the person filling out the form select info from Salesforce with a dropdown or something? We have a Company Name field that we want them to pull in the Account Name from Salesforce.

  • jumpfox-invites

    Is it possible to prepoulate an field with a '?' in it?

    For example.

    www.jotform.com/formid0001000000/?Examplefield=How%20do%20I%20insert%20a%20question%20mark%20?

  • sbufsaweb

    I haven't been able to get this to work for an iFrame. I have two forms and am trying to grab the submission id of one form and display it on another.

    I added sid={id} to the url of the form and that works, however, it displays as "{id}" in the field.

    Is there a work around that doesn't involve php?

  • misyte

    Has anyone been able to solve this pulling pre-populated fields from infusionsoft?

  • docvadi

    Apparently the method doesn't work for checkboxes? I tried the link you generated above in the checkbox section but the form showed up blank.

  • cleanarc

    is there anyway to pass a unique image from my website into the jot form? The use would click on an "order print" link which I can use to prepopulate the product name, but I need to pass along an associated image to give the form user a comfort level that what they are buying is the same as what they clicked on in my website

  • ekinaus

    Hi, I'm trying to get the previous page product title or url automatically prepopulated into the form (dragged from the page it was on), is this possible?

    If so, how?

  • tim

    I keep getting old prepopulated fields appear not the ones in the new URL. Whats happening here?

  • dorsetholidaylets

    Does this only work with the Jotform Thank you Page or can you create forms which populate another and use IFrame to add both forms to my web site.
    I rather not use the Jotform Thank You page but use a Customized page on my web site.

  • jonathan doughrety

    For the most part the prefill works, but for certain checkmark/bullet points it does not. For example, the following link does not work:

    http://form.jotform.us/form/42727008555153?=cfnOr[]=CFN

    What is the problem?

    Jonathan

  • bartprescott

    This works really well and I'm using it on my site, BUT!...
    If you enable the "Continue Form Later" feature and set the "Autofill" to enabled, then the fields set via the URL are ignored!
    I'd really like to use both URL populating and autofill enabled. Is there a fix for this?
    Thanks
    Bart

  • bowmandc1

    I tried this and it is not working. Here are the links to form 1: http://form.jotform.us/form/42504745405148 and form 2: http://form.jotform.us/form/42528084672156.. here's the URL I placed in the Thank You Custom URL field: http://form.jotform.us/form/42528084672156?currentName={currentName}&membershipNumber={membershipNumber}. Receiving a 405 Not Allowed error

  • suzanabueno

    How can I use this to select a form language?

  • James

    Will this work on multi page forms?

  • lbtallman

    All I'm trying to do is prepopulate one field with a number and that is the only field that does not get populated. What am I doing wrong?

    This is the url I'm using.

    https://secure.jotformpro.com/form/41784003524954?numberOf50=2

  • ugurarcan

    What I need seems bit different. I want the page title that my form is embedded on to populate as one of the field inputs. Any idea how I can do that? Thanks.

  • ajvdhek

    Brilliant. Is there any way to set the language?

  • abcmanagement

    Sorry, I still did not get it.
    First I do not know what values to copy, second, I am going to have many rows and that will be many values and make that line extremely long.

  • dpmurphy

    Looks like my previous question got truncated. My problem is that the prepopulated email only shows up as gray sample text, and does not pass through the form submission.

  • dpmurphy

    I have setup 3 URL parameters to prepopulate my form. The page hosting page is ASP, so the parameters are inserted at runtime using session variables.

    This is the querystring I'm using with my javascript embedded form:
    ?yourName7[first]=&yourName7[last]=&email8=

  • prolutive

    How to submit session and field parameters in the same URL?
    ?yourChoix=23 OK
    ?session=myname OK
    BUT:
    ?yourChoix=23?session=myname Doesn't work
    Thanks

  • oseo5511

    is this possible using the iframe for forms embedded on CMS like wix?

  • billylevine2003gmailcom

    In the above example how do I pass it the value of the field instead of hard coded value.

    In my application I am feeding a second jot form from a parent jotform and I want to pass values from one the other

  • LeoC2

    I can get this to work fine when diretly accessing the jotform but not when the form is in an iFrame on my site. What am I doing wrong?

  • homelink

    Using PayPay Pro with the embedded Javascript script, is it possible to pre-select a radio button?

  • Wtfuck

    Hi
    What about the Date field
    How can i prepopulation the field
    Because isn't in the user guide
    Thx
    -Wtf