Gravity Form Fields Populate Dynamically – How To


Learn how to auto-populate Gravity Form fields based on selected options. Kori Ashton from WebTegrity will show you step by step how to pass strings in the form.

Full Audio Transcript

Hey, y’all. Welcome to another WordPress Wednesday. My name is Kori Ashton in San Antonio, Texas and I have to start the whole video by giving a quick shout-out to some awesome girls that are in a code camp that I got the opportunity to hang out with today. Go Cardinals from UIW here in town. I just have to give a shout-out to Abigail and all the girls there. Keep learning how to code.

Alright, so for all of you that are here for the video, this is what I’m going to show you today. How to pass something in a Gravity Form. Pass the strings dynamically. Maybe even from what they’ve clicked on in a page. Let me show you what I’m talking about. See if this is what you’re looking for because I’m going to show you how to do it. Here in just a couple of minutes. Let’s say, for instance, you’re visiting this page and you see this particular product.

That’s the example I’m going to show you and we want to inquire about this one particular product and it says “2030 Tempered Clear Glass”. I’m gonna click on that. What I want you to see is that this form is dynamically populated with the actual product name. That happens with a little extra nerd code that you can actually put inside of Gravity Forms, so it can have logic and know what was chosen and maybe your user doesn’t have to re-fill out the information, right? You can imagine them having to toggle back and say “What was the name of that product? I don’t even remember.” We want to make it much easier for people to experience things and fill out our forms. This is how we do it. Check this out. We’re gonna go over here. I’ve got an example, “Contact Form” here. With a “Service Requested” area here. I’m gonna show you the page. I want them to be able to click on “Request WordPress Support” or “Request SEO Service” and when they click on that, right now, they’re just going over here to my form and there is nothing being populated. They’re gonna have to type it again, that they “Request WordPress Support”.

Well, I want to be able to pass over to this form, that they’re already requesting SEO Services. Here’s how it’s done. You’re gonna go into the form, itself, that’s already been built and we’re gonna go to that one field that has the service requested that we actually want to auto-populate. Here we’re gonna jump into the advanced tab and you want to be sure that this is selected, “Allow Field to be Populated Dynamically”. You’re gonna open up this little drawer and you’re just gonna give it a unique name. For now, we’re just gonna say “Service Name”. That’s gonna be our unique identifier. You need to remember exactly what you typed here. That’s gonna be important as we move onto the next step. You’ll click “Update’.

Then, we’re gonna go into our the page we want it to pass over to. But, we need to go over to the actual page where the links live. This is where we’re gonna add a little bit of cool nerd code. Check this out. We’re gonna go to “Edit Page” and inside of the link is where we’re going to add the nerd code to let it know what to pass, so just follow me for a second with this. We’re gonna back that forward slash out and we’re gonna type in a question mark and we’re gonna remember what we called that parameter. We called it “Service Name” and we’re gonna say the service name on this particular link equals “WordPress Support”. You can put spaces over here, that’s fine. On this particular service, again we’re gonna back out that forward slash and we’re gonna question mark. “Service Name” equals, and we’re gonna say “SEO Service”. That is our new link, now. I’m gonna click UPDATE and let’s test it to see if it all worked correctly. Let’s view the page. Now, when we click on WordPress Support it should go over here and pass over WordPress support inside of that one field that we told it to. Let’s back up and double check our other one. “Requested SEO Service” and there you go. SEO Service. Kinda cool. right. I’m gonna give you one more link that you’ll be able to find some other cool stuff on passing dynamically population, passing query strings
and all that cool stuff inside of Gravity Forms.

If y’all have more questions about this and this is blowing your mind, be sure to check out our whole playlist here on Gravity Forms. We’ve got some cool tips for you. I’ll see you next WordPress Wednesday. Bye, y’all.

More on Dynamically Populating Fields

Find more free WordPress video tutorials from Kori

Call Kori Directly –