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 a 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 dlpfbin 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. Eg. {{ a3fda.selectedProducts }}  will return a list of all the selected product SKUs. In the examples below "KEY" is a placeholder for the answer piping key.

Products
KEY.quantity - the total quantity selected for the question
KEY.selectedProducts - an array of selected product SKUs
KEY.quantities.SKU - get the selected quantity for a product SKU
KEY.names.SKU - get the name of a product
KEY.prices.SKU - get the price of a product
KEY.total - get the total price for a product question (will be 0 is question is not visible)

Appointment
KEY.start - The datetime and timezone for the appointment start
KEY.stop - The datetime and timezone for the appointment end
KEY.start_date - The start date of the appointment
KEY.start_time - The start time of the appointment if it is in minutes
KEY.stop_date -  The end date of the appointment
KEY.stop_time - The end time of the appointment if it is in minutes
KEY.appointment_title - The title of the appointment
KEY.appointment_location - The location of the appointment
KEY.appointment_description - The description of the appointment
KEY.minuteLength - The length of the appointment in minutes
KEY.hourLength - The length of the appointment in hours
KEY.dayLength - The 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 or 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 - the selected options as an array instead of a comma separated string

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 format: {{ KEY | DEFAULT_VALUE | TRANSFORMATION }}  or to use it 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"


Did this answer your question?