How to use it
- In a Select, Radio or Checkbox field, write each option as
value:label, for exampleDE:Germany, and turn on the field's value and label option. - Note the ID of the field.
- In the form's email content, write
{kiln_form_label:FIELD_ID}, with the field's ID in place ofFIELD_ID. The email shows the chosen label. For checkboxes, it shows each chosen label, separated by commas. - 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:labeloptions 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.