Modules / Forms

Form: option labels in emails

Show the label of the option a visitor chose in a form email, such as "Germany", where Bricks mails the value, such as "DE".

#33 of 39 modules by votes

  • On by default
  • Needs Bricks 2.4 or newer
  • Tested with Bricks 2.4.3

Tile 33 of 39, ranked by votes · Recording in progress

Where to find it in the builder

Two tags in the dynamic data list, under the Kiln group:

How to use it

  1. In a Select, Radio or Checkbox field, write each option as value:label, for example DE:Germany, and turn on the field's value and label option.
  2. Note the ID of the field.
  3. In the form's email content, write {kiln_form_label:FIELD_ID}, with the field's ID in place of FIELD_ID. The email shows the chosen label. For checkboxes, it shows each chosen label, separated by commas.
  4. To list the whole submission with labels, write {kiln_form_all_fields}. It works like Bricks' {{all_fields}} block.

A line written as :Germany has no value, so the label serves as the value.

Where it appears in Bricks

  • {kiln_form_label:field_id}, listed as "Form: option label of a field (emails)".
  • {kiln_form_all_fields}, listed as "Form: all fields with option labels (emails)".

Use them in the Form element's email content, the confirmation email and the success message.

Limits

  • Only fields with value:label options show a label. For any other field, the tag shows the submitted value.
  • A submitted value that is not one of the options is shown as typed.
  • {kiln_form_all_fields} skips file, HTML and password fields and the honeypot field. It prints each field as "Label: value", one per line.
  • {kiln_form_label:field_id} is empty for a password field.
  • The output is safe in HTML emails, plain-text emails, attributes and JSON. Line breaks become spaces, and curly braces and backslashes are encoded.
  • In a webhook body the output is safe for JSON but HTML-encoded. Use Bricks' own {{field}} tokens there.
  • Bricks' own {{field}} tokens still show values.

Settings

None. Turn the module on in Bricks > Kiln (it is on by default).

Requirements

Bricks 2.4 or newer.