Populate Fields on the second base on the first form input

Hello everyone,

The website I am working on has two Forms, Form A and Form B. Form A are for the company employees and Form B for the customer. The company employee will fill up Form A and the form will send to the customer with the amount price and invoice for the services and a link to Form B, where the customer will pay(Stripe). When customer’s click on the link from the email the received from Form A they will be taken to Form B. Form B should automatically display the amount price from Form A, the customer shouldn’t be able to change the amount price and just have to input the credit card for payment on Form B.

Is it possible to populate the fields on Form B, for example that amount price, from Form A input? Any suggestion on how to this? Your help and input is much appreciated.

This is how you pass information from Form A to Form B:

To make the amount field unchangeable in the form, you can use this method to make the field read only in Form B:

1 Like

The easiest way to pass data through from Form A to Form B is Gravity Forms Easy Passthrough:

https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/

The easiest way to prevent a user from editing a field is Gravity Forms Read Only:

https://gravitywiz.com/documentation/gravity-forms-read-only/

And if you aren’t picking up what I’m putting down, the easiest way to build anything with Gravity Forms is Gravity Perks!

http://gravityperks.com

3 Likes

This is great!

:joy: :+1:

1 Like

Hello Chris,

I have implemented your suggestions and it works, thanks but there is a problem. The user can change the value of the field just by editing the link. For example when they will click this link, http://siteurl.com/form-url/?parameter_price=500, the Amount Price Field will be $500 but if the user change the link from “parameter_price=500” to “parameter_price=400” then the Amount Price Field will be $400. Is there a way for the users to not edit the parameter value or at least the parameter value hidden? Thanks.

Sorry for the long post, hopefully it’s enough to steer you in the right direction though.

The easiest way to mask the Dynamic Population is to use the Gravity Form Unique ID addon by Gravity Perks and create a long alphanumeric string as the ID in Form A. Then use Gravity Forms Populate Anything by (you guessed it) Gravity Perks to dynamically pull in the data based on the uniqueID.

With this approach the user will receive an email with a url that looks more like this:

https://testing.com/form-b/?invoice=kjhfenaqhhq234lkjfdkj10tfdslkjf

It’s pretty much impossible for them to change the values with this method.

*btw, I have no affiliation to Gravity Perks and receive no compensation. I’m just a long time user/supporter of a large percentage of their products and it’s definitely the easiest way to do what you’re looking to do. *

On the flipside of that coin.

If you’d rather program it on your own, you could try something like sending the user:

    https://testing.com/form-b/?invoice={entry_id}

Then you can program a plugin to grab the ID and use get_entry to pull back the data and then use the Dynamic Population Hook to set the data for each of the fields.

I’ve done something similar to this in the past with the addition of adding a lastName variable to the url. This is mainly used as a crude verification tool. You check the lastName against the invoice ID so that it makes it slightly more difficult for a user to see other invoices that don’t belong to them.

I should note… I did have our SEO team leader (rightfully) complain about that method though. Apparently if you have any information about the user in the URL when it hits Google Analytics it can cause some issues with privacy concerns (duh Nick… lol …). However, you could use other fields to verify, or none at all. In the end we wound up using a Unique ID and then left the all the dynamic population hooks because that work was already complete.

2 Likes
© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.