Templating
On this Page
FAQs
Introduction
Templating is a fancy way of instructing Wufoo to replace a phrase with actual data that the user typed in. The easiest way to explain the concept is with an example. Let’s start with a simple template:
Hello from {entry:Field1} {entry:Field2}.
The above template, when displayed to you, will replace {entry:FieldX} with the data typed in:
Hello from Ryan Campbell.
The templating system replace the template with the data that the user typed in. That’s the idea behind templating.
Formatting Guide
Now that we have seen how a template works, we need to find out how to construct our own. Templating consists of two parts:
- A template
- A parameter
Based on that, we can break down the original example:
- Template: {entry:}
- Parameter: Field1
The template tells Wufoo to use entry data (that’s data the user typed into the form), and the parameter tells Wufoo which field to grab the data from. The only tricky part here is to find out what to put in the parameter. How can you distinguish between Field1, Field2, or FieldX. This is where the API comes in.
1) Log in to your Wufoo account.
2) Click Account in the top right.
3) Click API Information
Once you are on the API information page, you will see a list of all of your fields and they will have a unique number in front of them. The number that you see is the ID of the field. So, if you want to construct a template, and the field has an ID of 3 next to it, your template would look like this:
{entry:Field3}
Fields Accessible by Templates
We have seen that all fields in our form can be accessed by a template, but can anything else? Currently, the following are support:
- {entry:EntryId} - The unique ID of the entry.
We plan on adding more data to this as our templating system grows.
Where can I use templates?
Templates can be used in the subject message for Notification Settings, in the receipt message for Send Confirmation Email to User, and in the Text Confirmation for Forms.
We also have simple templating for the Redirect URL. The {entry:EntryId} command is valid, so that you can append the entry Id to the URL that you wish to redirect to.
How do I find my API information?
You can read more about finding your fields in the API Docs or in the example above.