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 "Your Name", you can then add their answer (like "Mark") to any other part of the form. This is great for making your forms feel more personal.
In this guide, we'll cover:
Answer Piping can be used to insert answers into:
Although Answer Piping is widely supported throughout Paperform, here are some areas where you can't directly use this feature.
Calculation Fields cannot be Answer Piped into other Calculation Fields, but the value of Calculation Fields can be used as normal with any other supported area on your form.
{{
) and then type the title of the question you're trying to use in answer piping.If the question being piped is the first one in the list, you can press "Enter" on your keyboard to complete the Answer Piping text.
Navigate to your form editor and locate the question you want to pipe the answer from.
Hover over the question and click on the "Configure" (Cog) icon appearing on the right.
Scroll to the bottom of the configuration window and locate the field titled "Pre-fill Key".
Copy the key next to the title "Pre-fill Key". It should look like an assortment of letters and numbers e.g. e7jcq
.
If you'd like to use a Custom Pre-fill Key for your Answer Piping, simply enter the key you'd like to use in the field marked "Custom Pre-fill Key". Ensure your key doesn't contain any spaces or special characters e.g. @!"£$%^&()*
Now that you have the Pre-fill Key copied, navigate to where you'd like the Answer Piping to appear.
Begin typing two forward-facing curly brackets ({{
) and then paste the key we copied earlier. Now add a further two curly brackets, but this time facing backward (}}
).
The final result should look like this:
e.g. Pre-fill Key: e7jcq
.
{{ e7jcq }}
You'll know whether Answer Piping is working by clicking outside of the area you're editing. You should see a bubble appear in the area your Answer Piping code was added instead of the code itself. The bubble will also contain the Question Title to determine which question is being piped in.
If the Answer Piping bubble does not appear, this generally means that the Answer Piping for this field isn't working. Be sure to check that the Pre-fill Key is correct (either custom or default), and that you're not attempting to use a calculation field within another calculation field.
Some default Answer Piping keys exist for use on your form, and they can be found listed below.
total
- The Total Price for your form ({{ total }}
)score
- The Total Score for your form ({{ score }}
)Due to the fact that Answer Piping updates in real-time, your form content can look a little strange when using answers from fields the respondent hasn't answered yet.
For example, if you want to insert the answer for "Your Name" into the following question to say "Hey {{ dlpfbin }}
, what’s your email?”, then the email field might look a bit weird before the person has entered their name into the "Your 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?" and then change to "Hey David, what’s your email?" 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 this:
{{ dlpfb | there }}
When the question is using the default answer as shown above, then the text on your form will output the following:
Once the field contains an answer, this will be shown in place of the default value defined above like so:
Most question types will permit the use of regular Answer Piping (e.g. {{ key }}
), however, sometimes you may need finer control over answers being inserted from complex fields.
The question types listed below 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 andsku
is the placeholder for a product's SKU. Make sure thatkey
is replaced with your actual Question Pre-fill Key or they may not work as intended.
key.street
— The street fieldkey.suburb
— The suburb fieldkey.state
— The state fieldkey.postcode
— The postcode/ zip fieldkey.country
— The country fieldkey.start
— Datetime and timezone for the appointment startkey.stop
— Datetime and timezone for the appointment endkey.start_date
— Start date of the appointmentkey.start_time
— Start time of the appointment if it is in minuteskey.stop_date
— End date of the appointmentkey.stop_time
— End time of the appointment if it is in minuteskey.title
— Title of the appointmentkey.location
— Location of the appointmentkey.description
— Description of the appointmentkey.minuteLength
— Length of the appointment in minuteskey.hourLength
— Length of the appointment in hourskey.dayLength
— Length of the appointment in dayskey.timezone
— Timezone of the appointmentkey
— The selected color's hex code (e.g. Black is #000000
)key.code
— The two-letter country codekey.name
— The full country namekey.year
— The selected yearkey.month
— The selected monthkey.day
— The selected daykey.array
— Selected options as an array instead of a comma-separated stringkey.selectedIndex
* — Position of the selected item within the list of optionskey.selectedIndexes
— Position(s) of the selected item(s) within the list of options (array, if multiple)key
— A list of the selected options, labeled by rowkey.rows.row
— A comma-separated string of the selected options for that row number, labelled by column (e.g. key.rows.1
is the first row)key.cells.cell
— Whether a cell is selected or not using Excel-style coordinates, labelled as true or false (e.g. key.cells.A1
is the first column in the first row)*Does not work for questions that allow more than one answer
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)key.quantity
— Total quantity selected for the questionkey.selectedProducts
— Array of selected product SKUskey.quantities.sku
— Selected quantity for a product SKUkey.names.sku
— Name of a productkey.prices.sku
— Price of a productkey.total
— Total price for a product question (will be 0 if question is not visible)key
— An ordered list of the ranked options selected.key.array
— An ordered array of the ranked options selected.key.commaSeparated
— An ordered comma-separated list of the ranked options selected.key
— The number correlating to the rating selected (e.g. a rating of five symbols is equal to 5
)key.hour
or key.hour12
— The hour in 12 hour formatkey.hour24
— The hour in 24 hour formatkey.minute
— The minutekey.ampm
— The time periodThere 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 }}
Remember to replace
key
with the Pre-fill Key of your field. Without this, the Answer Piping Transformation will not work.
Available transformations include:
{{ key | "default" | uppercase }}
key
to "DEFAULT"{{ key | "DEFAULT" | lowercase }}
key
to "default"{{ key | "default" | capitalize }}
key
to "Default"{{ key | "support@paperform.co" | encoded }}
key
to "support%40paperform.co"{{ key | "2019-12-31" | date d/m/y }}
key
to "31/12/19"