LooonaDocslooona.com ↗

Use Looona › Forms › Answers in messages

Answers in messages

Write a form's message yourself, with each answer as {{identifier}} in Markdown or ${identifier} in JSON.

Most forms never need this. The Automatic and Custom layouts write the message for you. See Delivery.

This page is for writing the message yourself, as code.

Identifiers

Each question has an Identifier: the name its answer gets in the message. You find it in the question's Advanced settings.

It's made from the question's label, like what_happened for "What happened?". It follows the label until the form is first published, then stays as it is, so your messages keep working.

Two more names come from Collected automatically: page_url and user_agent.

A File upload answer is each file's link. In Markdown, {{screenshot}} gives the file's name as a link. In JSON, ${screenshot} gives its name, then its link. A question that takes several files gives a list, like a multiple choice. See Files and screenshots.

Edit as code

  1. Pick Custom

    In the Delivery tab, under Layout, pick Custom.

  2. Open Advanced

    Under the layout, click Advanced, then type in Edit as code.

  3. Write the message

    Each answer goes in as its identifier.

Your first change turns off the simple editor for this layout. Back to simple editor turns it back on and drops your code, after a warning.

Markdown

By default the code is Markdown, with each answer as {{identifier}}. Every destination takes it, so the form's message is always Markdown.

For example, **Severity:** {{severity}} gives "Severity: Blocks my work".

To show a part only when an answer was given, wrap it: {{#if steps}}Steps: {{steps}}{{/if}}.

Typing {{ lists the identifiers. A name the form doesn't have is underlined, and that part of the message stays empty.

JSON

JSON is written for one tool, so it goes in a destination's own message, never in the form's: see A destination's own message. There, a destination that takes its own format shows a Markdown / JSON switch: Slack takes Block Kit, Jira the Atlassian Document Format.

In JSON, each answer goes in as ${identifier}. For example, "text": "${summary}".

To write ${…} as plain text, as in a code sample, type $${…}. Looona keeps it as ${…}.

The form can't be published while the JSON can't be read or filled. Use Send a test to check how the tool shows it.

What respondents never see

Identifiers and code stay behind Advanced. People who answer the form only see your questions.