# Answer piping

Use @ mentions to reference answers anywhere in your form.

## Answer piping

Type @ to reference any field's answer — in question titles, content blocks, thank-you pages, email notifications, and integration messages. Values update dynamically so each respondent sees personalized content.

<h2 id="how-it-works">How it works</h2>

<p>
  Type <strong>@</strong> in any text that supports it (see below). A mention menu appears listing your form's fields grouped by type:{' '}
  <strong>Hidden Fields</strong>, <strong>Answers</strong>, <strong>Repeating groups</strong>, <strong>Calculated Fields</strong>, and{' '}
  <strong>Metadata</strong>. Pick a field and formbase inserts a variable chip at your cursor.
</p>

<p>
  In the editor, piped values show as a chip (e.g. <strong>@First name</strong>). When a respondent fills out the form, formbase replaces
  each chip with their actual answer.
</p>

<p>
  To type a plain <strong>@</strong> instead — an email address or a handle — press <kbd>Esc</kbd> to close the menu and keep typing. The
  menu also closes on its own when nothing matches what you typed after the <strong>@</strong>.
</p>

<h2 id="where-it-works">Where piping works</h2>

<ul>
  <li>Question titles — a question never offers its own answer, which would be circular</li>
  <li>Content blocks: paragraphs, headings, list items, table cells, links, and image captions</li>
  <li>Thank-you page content</li>
  <li>Translations of any of the above, where the mention carries into each language</li>
  <li>
    Email notification subjects and bodies: self-notification, respondent confirmation, and abandoned-form reminder emails, plus the request
    invitation
  </li>
  <li>
    Integration templates: <a href="/integrations/slack">Slack</a> and <a href="/integrations/discord">Discord</a> messages,{' '}
    <a href="/integrations/github">GitHub</a> and <a href="/integrations/linear">Linear</a> issue titles and descriptions, and{' '}
    <a href="/integrations/notion">Notion</a> and <a href="/integrations/airtable">Airtable</a> field mappings
  </li>
</ul>

<p>
  Choice option labels and matrix row and column labels take mentions too, but a narrower menu: only Hidden Fields, Calculated Fields, and
  Metadata — the values that exist before anyone answers. An option label is how the option reads in the summary, in exports, and in the
  logic picker, so it cannot depend on another answer.
</p>

<p>
  Button labels and repeating group titles take no mentions. Two related features work differently:{' '}
  <a href="/building-forms/redirect-after-submit#query-parameters">redirect query parameters</a> pick a field from a dropdown for each
  parameter, and <a href="#input-defaults">input defaults</a> put a value inside a field instead of in text.
</p>

<h2 id="input-defaults">Pre-filling an editable field</h2>

<p>
  A mention shows a value as text the respondent can't change. To put a value <em>inside</em> a field so the respondent can confirm or edit
  it, use a field reference as the field's default instead: type <kbd>@</kbd> at the start of a Text Input, Text Area, Email, Phone Number,
  Website URL, or Number field. That menu lists only <strong>Hidden Fields</strong> and <strong>Calculated Fields</strong>, because those
  have a value before the respondent starts answering. See{' '}
  <a href="/building-forms/field-configuration#default-values">Default values from other fields</a>.
</p>

<p>
  That is the technique for a <strong>share link</strong>, where a value can only arrive through a URL parameter and so needs a hidden field
  to land in. On a <a href="/requests/overview">request</a> you don't need any of it: the caller pre-fills a visible question directly when
  they create the request, using <code>prefill</code>, and can mark a key <code>readonly</code> so the recipient sees it but cannot change
  it. Build a hidden field when you want to carry data the respondent should never see, not just to pre-fill an answer. See{' '}
  <a href="/building-forms/hidden-fields#requests-prefill-directly">Requests don't need a hidden field to pre-fill</a>.
</p>

<h2 id="field-types">What you can pipe</h2>

<p>In body text the @ menu lists five groups, in this order:</p>

<p>
  A field that a chip points at but that no longer exists shows the tooltip "Referenced field was deleted" and renders as empty at fill
  time. If you delete a hidden or calculated field and add another with the same name, existing chips reconnect to it on their own. Question
  references never reconnect that way — titles change and collide, so they stay broken until you re-insert them.
</p>

<h2 id="metadata-variables">Metadata variables</h2>

<p>
  Beyond field answers, the <strong>Metadata</strong> group carries runtime values. Some are available everywhere; others only in email
  templates. The name below is what the chip reads.
</p>

<h3 id="metadata-form-and-email">Available in both form content and email templates</h3>

<h3 id="metadata-form-only">Form content only</h3>

<h3 id="metadata-email-only">Email templates only</h3>

> 💡 **PINs as reference numbers**
> <p>
>     Drop a <strong>6 Digit PIN</strong> into the respondent confirmation email as a reference number. Respondents can quote it in follow-up
>     conversations, and you can search for it in the submissions table.
>   </p>

<h2 id="examples">Examples</h2>

<ul>
  <li>
    <strong>Personalized question</strong> — "Thanks @First name! How would you rate your experience with @Company?"
  </li>
  <li>
    <strong>Dynamic thank-you</strong> — "Your total is @Price. We'll send a confirmation to @Email within 24 hours."
  </li>
  <li>
    <strong>Conditional email</strong> — "Hi @First name, your lead score is @Lead score. Our team will be in touch."
  </li>
  <li>
    <strong>Redirect with context</strong> — in redirect settings, add a <code>name</code> parameter mapped to the Name question and a{' '}
    <code>plan</code> parameter mapped to Plan. The preview shows the URL respondents are sent to:
  </li>
</ul>

```
https://yoursite.com/confirm?name={Name}&plan={Plan}
```

<h2 id="referencing-repeating-groups">Referencing repeating groups</h2>

<p>
  <a href="/building-forms/repeating-groups">Repeating groups</a> let respondents add as many entries as they need, so a single reference
  can pull in more than one value. How the @ mention resolves depends on what you point it at.
</p>

<ul>
  <li>
    <strong>A single member field</strong> — formbase joins that field's values across every entry with <strong> · </strong>. Mentioning the
    Name field of three guests shows "Jane Appleseed · Marcus Lee · Priya Patel".
  </li>
  <li>
    <strong>The whole group</strong> — every entry appears inline. Member values within an entry join with <strong> · </strong>, and entries
    are separated by commas. A group with Name and Age shows "Jane Appleseed · 34, Marcus Lee · 29".
  </li>
</ul>

<p>
  In an integration column the whole group appears as numbered, labeled rows instead, so each entry stays readable: "1. Full name: Jane
  Appleseed, Age: 34, 2. Full name: Marcus Lee, Age: 29".
</p>

<h2 id="deleting-piped-fields">Deleting a piped field</h2>

<p>
  A mention left pointing at a deleted field is a publish <em>error</em>, not a warning: the issue indicator in the toolbar flags every
  stale reference — in form content, email templates,{' '}
  <a href="/building-forms/translating-form-content#field-reference-checks">translated emails</a>, and integration message templates — and
  publishing stops until each one is fixed. Open the flagged location, remove the broken chip, and re-insert the correct field.
</p>

<h2 id="next-steps">Next steps</h2>
<div class="not-prose grid gap-3 sm:grid-cols-2">
  - [Custom thank-you page](/building-forms/custom-thank-you) — Pipe answers into the post-submit screen
  - [Form settings](/building-forms/form-settings) — Set up notification templates with piped variables
  - [Self notifications](/submissions-analytics/self-notifications) — Use piping in team alert emails
  - [Respondent notifications](/submissions-analytics/respondent-notifications) — Personalize confirmation emails with piping
  - [Repeating groups](/building-forms/repeating-groups) — Let respondents add multiple entries to a group
</div>
