Don’t you think it would be fantastic if you could open up a form and a load of it was already filled out? It would be like your computer just knew who you were and could fill out forms for you. Not in the scary “Computer’s are taking over the world” kind of way, but more of the “I don’t want to have to fill in all of this information and it already being filled out is pretty great” kind of way.
Fortunately, that’s most definitely possible with Wufoo and some URL modifications. You may have seen the help document we have on URL modifications, but what if you want to see it in action? I’ve got some spare time on my hands, so I’ll take you through how to use URL modifications to pre-fill your form for that special someone who may or may not think computer’s are taking over the world as a result.
Let’s say you have a monthly manager feedback form about each employees job. You want your employees to fill it out about their specific manager each month, but you don’t want them to have to fill out their name and details and also their manager’s name. That would take them time that you’d rather they spend doing something else. Besides, why have them fill out the form in full each month when you can send them a link to the form that’s already filled out for them? That would just be a bit silly.
Firstly, let’s have a quick peek at the feedback form:
Look at that. The form is so lovely and nice, but none of it has been filled out. Now let’s say that there’s an employee called Ryan Irwin. He takes this form loads and he’s sick of having to fill out the first few fields all the time. He always has the same email address, he works in Marketing and his manager is Sally Eastwood. It’s not changing for him, so why give him a blank form all the time? Instead we can edit the URL to fill it in for him when he receives the form. Let’s get started.
Firstly, we’ll have to find out the API Id’s of each field that you want to pre-populate. To do that, we just have to click the ‘Code’ tab on the form and then click ‘API Information’ in the top right corner of the page. Here’s mine:
Right, so now we can see all the API Id’s of each of the fields that we want to pre-populate. Now, all we have to do is plug it into the URL to the form. At the moment, the form will show up blank with this link:
If we want to fill in all of Ryan Irwin’s details we just have to change the link to:
“Phowahh!” You’re probably thinking. “How did he get there?” At first look, it can be a bit scary, but the breakdown should make it easier.
**/def/** – When you edit a URL, you have to start defining the additions with /def/
field217= – This is just the API ID of each field followed by an equals to define what you want the field to say.
& – If you’re filling in more than one field, you have to separate each one with &.
%40 – Now this is a bit confusing. There are some characters that URL’s aren’t cool with so you have to essentially code them in. %40 will create an @ in the field.
%20 – Similarly, you can’t put a space in a URL. So %20 creates that space for you! There’s a bunch of these characters that can’t be used in URL’s and the URL modification help article gives you the cheat for all of them.
Now let’s see the finished product:
Sorted. All we would have to do is send Ryan that modified URL and he could use it every time he wants to fill out the form. Simple as that. And there you have it. Next time you want to prepopulate a form, just throw in some modified URL’s and you’ll be off to the races.