What is Answer Piping?

Answer Piping is a feature available on Pro and Agency plans that allows you to “pipe” or display an answer to a question, a score, or a payment total into just about any other part of the form in real-time.

For example, if someone has answered the question “Name?”, you can then add their answer (like “David”) to any other part of the form. This is great for making your forms feel more personal.

You can use answer Piping insert answers into:

  • question text
  • description text
  • general/body text
  • custom success pages
  • emails
  • custom PDFs

How to set up Answer Piping - the slow way:

1. Go to ‘Configure’ (cog icon) to the right of the question of which you want to pipe/insert the answer. For example, if you want to pipe/insert ‘Name’ into other parts of the form, go to Configure to the right of the ‘Name’ question. If you want to insert score calculations or price totals, skip this step and go to step 5

2. Scroll to the bottom of the Configure window to “Pre-fill Key”, and copy the value. It will just look like a bunch of random numbers and letters, for example, in the screenshot below, it is 6iecu. If you want to, you can use a custom pre-fill key instead, by writing in a pre-fill key into the custom pre-fill key box.

3. Go to where you want to pipe/insert the answer and type in {{ key }}, where key is the pre-fill key (e.g {{ 6iecu }}).

You will know it has worked because once you click out of the area to do something else, the key will turn into a blue bubble that represents the question. Like this:

If it doesn’t work, then the key and curly brackets will remain red and the blue bubble won’t appear.

If you want to pipe in the total price, use the key “total”.
If you want to pipe in the score, use the key “score”.

How to set up Answer Piping - the fast way:

Anywhere that accepts answer piping, simply type two curly brackets "{{", and then start typing the name of the question you would like to pipe in. This will open up a dropdown of available fields.

Simply click on the desired question in the dropdown, or press enter on the keyboard if it is the first option, to insert the pre-fill key for that question.

Setting a default answer

Because answer piping is live, sometimes your forms can look a bit weird before someone has given an answer. For example, if you want to insert the answer to “Name?” into the following question to say “Thanks {{name}}! What’s your Email address?”, then the email field might look a bit weird before the person has entered their name into the “Name?” field:

You can set a default answer to appear before the customer has given an answer to make forms read better. This is especially good if you are piping answers that are not required and may not be answered. For example, you may want the email question in the last example to say “Hey there, what’s your Email address?” and then change to “Hey David, what’s your Email address?” when the name field is answered. Here’s how to do this:

When piping an answer, follow the format {{ key | default }}. For example, the key dlpfb in the example above with a default value of “there”, it will look like{{ dlpfb | there }}.

and it will look like this in the final form before an answer is given to “Name?”:

and like this after an answer is given to “Name?”:


Answer Piping Super Powers

Some question types support more advanced answer piping features that allow you to access additional properties. These additional properties can be particularly helpful in calculations and are accessed via "dot notation" on the answer piping key. For example, {{ a3fda.selectedProducts }} will return a list of all the selected product SKUs.

In the examples below, key is a placeholder for the pre-fill key and sku is the placeholder for a product's SKU.

Products
key.quantity — total quantity selected for the question
key.selectedProducts — array of selected product SKUs
key.quantities.sku — selected quantity for a product SKU
key.names.sku — name of a product
key.prices.sku — price of a product
key.total — total price for a product question (will be 0 if question is not visible)

Price
key — total price for a price question (will keep the price even if not visible)
key.total — total price for a price question (will be 0 if question is not visible)

Total price
total — total price for the entire form

Appointment
key.start — datetime and timezone for the appointment start
key.stop — datetime and timezone for the appointment end
key.start_date — start date of the appointment
key.start_time — start time of the appointment if it is in minutes
key.stop_date — end date of the appointment
key.stop_time — end time of the appointment if it is in minutes
key.appointment_title — title of the appointment
key.appointment_location — location of the appointment
key.appointment_description — description of the appointment
key.minuteLength — length of the appointment in minutes
key.hourLength — length of the appointment in hours
key.dayLength — length of the appointment in days

Country
key.code — the two letter country code
key.name — the full country name

Address
key.street
key.suburb
key.state
key.postcode
key.country

Date
key.year
key.month
key.day

Time
key.hour, key.hour12 — the hour in 12 hour format
key.hour24 — the hour in 24 hour format
key.minute — the minute
key.ampm — the time period

Dropdown and Multiple Choice
key.array — selected options as an array instead of a comma-separated string
key.selectedIndex* — position of the selected item within the list of options
key.selectedIndexes — position(s) of the selected item(s) within the list of options (array, if multiple)

*Does not work for questions that allow more than one answer


Transformations

There is one more set of answer piping features that can come in handy. Transformations allow you to modify an answer piping value using the following formats.

With a default value
{{ key | default_value | transformation }}

Without a default value
{{ key || transformation }}

Available transformations include:

uppercase
{{ key | "apple" | uppercase }}
Transforms "apple" or the value of key to "APPLE"

lowercase
{{ key | "APPLE" | lowercase }}
Transforms "APPLE" or the value of key to "apple"

capitalize
{{ key | "apple" | capitalize }}
Transforms "apple" or the value of key to "Apple"

encoded
{{ key | "josh@paperform.co" | encoded }}
Transforms "josh@paperform.co" or the value of key to "josh%40paperform.co"

date
{{ key | "2019-12-31" | date d/m/y }}
Transforms "2019-12-31" or the value of key to "31/12/19"