Wufoo is a great form service. Not only is the build interface quick and easy to understand, it works well for statically hosted sites such as this. However, unlike the traditional embedded forms we all know, it’s not readibly obvious how to dynamically modify field data such as a username, or some info about the visitors environment. Luckily they provide a couple of different ways to do this.
I’ve had two different use-cases where I’ve needed to populate hidden fields in a Wufoo form.
Use-case One: Browser Information
In this instance, I needed information about the users browser on a diagnostic form. Step one is to find the name of the field using your favorite browser tools. Each field has a name such as “Field1”. Armed with that information we can use the “defaultValues” option in the form embed code to supply values, even if the fields are hidden. So in my case, since some of the fields I was populating were the dimensions and userAgent, I used code similar to the following (not showing complete snippet):
To mark a field as hidden, add the class “hide” to the “Add CSS Layout Keywords” field on the fields options on Wufoo.
Use-case Two: Referral Information