How to allow field to be populated dynamically Gravity Forms

Gravity Forms is the most advanced and feature rich form builder plugin in the market. There is nothing which you can’t make with Gravity Forms.

Using dynamic population in Gravity Forms allow field to be populated dynamically with a value (or values depending on the field type). This value can be passed via Query Strings, Shortcode and/or Hooks. This walk-through will give you an example of how to use each method of dynamic population to dynamically populate a field on your form!

There are three steps to configuring dynamic population in Gravity Forms:

  1. Specify which field should be populated.
  2. Configure how the field should be populated.
  3. Determine what value the field should be populated with.

What kind of fields you can populate dynamically using this method in Gravity Forms:

  • gravity forms populate hidden field dynamically
  • gravity forms populate dynamically any field from another field
  • gravity forms populate dynamically populate radio buttons
  • populate text fields

Gravity Forms Populate Field Dynamically using Query String

You can populate a field via the query string by appending the dynamic population parameter you specified for the field to the end of your form URL along with your custom value.

Note: I have used same this method as an example.

Assuming that a Gravity Form is on the page at this URL, any field with the dynamic population parameter name your_parameter would be populated with the value value.

When is Gravity Forms dynamically populate drop down When is this method useful?

Let’s say you have a list of support services that you’re displaying on your website (ex. WordPress, SEO, Digital Marketing). Each service has a link to a contact form so users can contact each service directly. Instead of creating a separate contact form for each service, you can add the service as a parameter to the contact form link and set up support/service field to be dynamically populated by that parameter name.

These are the services and these will be passed via query string parameter to the below form:

How to allow field to be populated dynamically Gravity Forms

Here is the admin area where I have created form, here I am going to make service type field to be populate dynamically so this field will common but if user comes from different page by clicking desire support() then user does not need to fill this field.

When you click on the service type field then all setting options will be appeared at the right of the screen.

Here please go to the Advanced option and click on “Allow field to be populated dynamically” and add a parameter name which should be unique or relevant.

Please see below screenshot:

Now please edit the page where you are showing your services or user will get redirected to the form by clicking on service.

Here are the links where we are going to pass the services value, please see below screen:

You just need to follow as in my case the form url is form + ? + service(parameter)+ = value ().

So if I go to the services page where all the services are listed and click on one of the service “WordPress” then this value will be filled dynamically in the service type field of the form via query string, please see below screenshot:

I have created another example to make it more clear that how dynamically field can be populated.

Here I am going to pass form field value from one form to another form.

I have created two forms i.e. form 01 which is placed on Get a quote page and form 02 placed on Contact us page.

If I fill the first form and do submit then I get a thank you as I did not set redirection for it right now.

To receive the passed value from form 01 to form 02, please add parameter like I want to pass 3 fields value (Name, Email and Phone).
so please add parameters as shown in the below screen:

So send the field value I have set the redirection on contact us page after form (Form 01) submission.

To send the first form data via query string to another form please add parameters as shown in the below screenshot:

I have passed these 3 parameters which will be sent to the form 02 :

Once I submit form 01 with these field values (Vikas,, and 123456789) then these values will be passed via query string and set to the form 02.

Here there are two things that we need to keep in mind that first is parameter name which are given to fields in form 02.

These are the parameters for which we are getting the data dynamically from form 01.

Second most important thing is fields IDs which should be correct because we are sending the data on the basis of these IDs.

Here you will see input_5_1 and input_5_2 and input_5_3 so this is the programmatically pattern of the input ID, here 5 is the form ID and 1,2,3 will be field ID.

Here I have used Name, Email and Phone because these are the fields of which I wanted to pass the data, so I have put here relevant text.

So the field which has:- 

client_name parameter will receive the Name data of field ID 1.

client_email parameter will receive the Email data of field ID 2.

client_phone parameter will receive the Phone data of field ID 3.

Leave a Comment