Skip to content

Text Piping

The term ‘Text Piping’ refers to the ability to insert information into a section of your form, that has been collected by a previous question or an external source. In the builder, this feature is labelled Insert Dynamic Text — you’ll find it behind the { } icon in a question’s toolbar. The majority of other form building providers only allow you to pipe text into a question. However, we have extended this service to enable text piping into an answer option too.

There are numerous reasons you may want to pipe text into a question, from personalizing your form for each respondent, to creating a clear line of questioning.

I.e. If you ask your respondents what brand of soda they drink, you can ‘pipe’ the text from their answer choice into any following related question.

E.g.

Question 1: Which brand of soda do you prefer?

  • a) Coca-Cola
  • b) Fanta
  • c) Sprite
  • d) Pepsi

Question 2: What do you think of Pepsi?

If a respondent selected ‘Pepsi’, you may then ask them what they think of this brand. To personalize the follow-up question for this respondent, you would pipe the ‘Pepsi’ text from the answer field into the chosen question field.

Alternatively, you could use Text Piping to transfer a respondent’s name into a question to improve the relational/ engagement aspects of your form.

You may also want to pipe text from a respondent’s previous answer selection into a follow-up question’s answer field.

E.g:

  1. What is the name of your Project Manager? -> Carol
  2. Who is your Office Manager? -> Brian
  3. If you had a complaint, who would you feel most comfortable talking to?

a) Carol

b) Brian

c) Neither Carol or Brian

d) Either, no preference

Several instances of Text Piping are occurring in the example above. ‘Carol’ and ‘Brian’, in (1.) and (2.), represent the answers given by respondents for the first two questions. These custom answers are then piped into (3.) as options (a.) and (b.).

You may notice that you are also able to pipe previous answers from both questions into the same answer option for a question, as illustrated by (c.).

This allows you to make your forms as relevant as possible to any respondents.

You will need at least two questions for Text Piping to work. The first question provides the text to be ‘piped’ (the Source), which can then be incorporated into the second (the Target).

Click into the target question’s text (or an answer option), then click the { } icon in the item toolbar to open Insert Dynamic Text. You’ll be asked “Where should the text come from?” with three options:

  1. Previous answers
  2. Contact details
  3. External data

This option pipes text from a previous question’s answer to a question or answer field of your choice. Once you’ve selected Previous answers, you’ll be presented with a Select a previous question drop-down listing all your previous questions. The question you choose determines which answers can be piped into your new field.

Note: The dialog reminds you to use required questions from previous pages to avoid inserting empty text — a One per page form makes this easier to keep track of, since only one question is answered at a time.

There are some question types that contain several sub-questions, such as a Matrix (Common Scale) or Text Boxes (Multiple). Choosing one of these reveals a second Select a sub-question drop-down, from which you can select your preferred sub-question.

Once you click Done, the piped value is inserted as a small highlighted chip inline with your text (e.g. Q7441480) rather than raw code — you don’t need to write or edit any syntax yourself, and inserting or reordering other questions won’t break the reference.

However, if you move a Text Piping-optimized question out of the necessary sequence, the corresponding pipe will break.

  • E.g. If Question A is piping text to Question B, Question A will always have to appear BEFORE Question B.

Note: We’d recommend that you create and organize all your questions before incorporating Text Piping. This will make it easier to visualize where you’d like to pipe text from and to.

This option pipes information from a respondent’s record in your Contacts list — useful when you distribute your form by emailing a mailing list, since Shout already knows who each link was sent to.

Note: The dialog warns you to ensure campaign tracking is enabled when mailing your campaign, or the placeholders will come through empty.

The Select contact detail drop-down offers considerably more fields than just name and email, including: name, last_name, email, custom, company, address_line_1, address_line_2, city, state, post_code, country, phone_number, language, and nps.

This option allows you to pipe text from Hidden Fields using a URL parameter or the JavaScript API.

These terms simply refer to the way of creating applications that access the features or data of other digital services. You would be using this component to retrieve relevant data on your respondents, from a source external to this site.

Before you can incorporate this type of Text Piping, you’ll need to define what kind of data you want ‘passed in’ to your form. To do this, add a question of type External Datasource (hidden questions) — found under the “Special” group when you click + Question — to your page (it still shows up in the sidebar simply as “Hidden Fields”). Type in the exact names of the fields you want to capture (e.g. name, email_address), matching how they’ll be sent, and use Add another field for more than one. All data is stored as a string, and this item is never shown to respondents.

Note: Field names must contain no spaces, and only - or _ as special characters.

There are two ways to ‘pass data in’ to your form from an external source: URL parameters on your form’s public link, or the JavaScript API.

The in-builder guidance shows this as a simple query parameter matching your field name directly, e.g. appending ?name=Jeff to your form’s link would fill a Hidden Field named name with “Jeff”. If you’re linking out from a mail campaign instead, Shout’s own Contact details piping (above) is usually simpler than passing data through the URL by hand.

This method allows you to embed your form directly into your website — a good alternative when the standard embed codes don’t fully suit your requirements. It requires a basic understanding of JavaScript.

For the exact config shape and worked examples, see Hidden Fields (API) — the builder’s own “read our guide” link (next to the Hidden Fields item) points here too.

Step Three: Using the data in the live form (optional)

Section titled “Step Three: Using the data in the live form (optional)”

The data stored by either of the above methods can be used in your live form, through the Hidden Fields item discussed in Step One.

Step Four: Passing the data out in a redirect URL (optional)

Section titled “Step Four: Passing the data out in a redirect URL (optional)”

You can pass information back to your website for confirmation that a respondent has completed your form. To do this, open your Exit Page in the builder and set its Exit page type to Redirect to web address. You’ll be asked for a Redirect URL and a Page Title, plus a Test link button to check it.

You can build the redirect URL to include one of your external data fields’ values so your own site can read it back — see Hidden Fields (API) for the exact syntax.