---
title: "Showing signature elements based on a field value (Liquid templates)"
slug: "display-signature-elements-based-on-field-value-liquid-templates-only"
description: "Use a Liquid case statement to show a signature element, like an office address, based on the value of an employee directory field such as location."
updated: 2024-01-16T21:08:45.000Z
canonical: "https://help.opensense.com/docs/display-signature-elements-based-on-field-value-liquid-templates-only"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.opensense.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Showing signature elements based on a field value (Liquid templates)

## Overview

This article uses the current Opensense template syntax, Liquid (**as of 2022**). If you're used to the older format, see [HTML and field types (legacy templates)](https://help.opensense.com/docs/html-field-types-1).

You can create conditions that show a specific signature element, based on the value in an employee directory field.

## Example

This example shows a different office address for each `location` value. Each `{% when %}` lists the values that match, and `{% else %}` sets the address for any other value.

```liquid
{% case location %}

{% when "New Jersey", "NJ" %}
555 Highpoint Lane<br />
Englewood, NJ 07631

{% when "Atlanta", "ATL" %}
1234 Pleasant Street<br />
Atlanta, GA 30301

{% else %}
1234 HQ Lane<br />
Louisville, KY 40210
{% endcase %}
```


<div class="kb-media-carousel" data-kb-media-carousel aria-label="Showing an address based on location">
  <div class="kb-media-carousel__viewport">
    <figure class="kb-media-frame"><div class="kb-media-frame__visual"><img src="https://help.opensense.com/media/displaysignature1-dcda4c63da0a.png" alt="Template code with a comment, then a case statement on location with New Jersey and Atlanta branches and an else branch for the HQ address" width="991" height="462" loading="lazy" decoding="async"></div><figcaption><strong>HTML code</strong> · The case statement in the template</figcaption></figure>
    <figure class="kb-media-frame"><div class="kb-media-frame__visual"><img src="https://help.opensense.com/media/displaysignature2-d71921c4ab59.png" alt="A rendered signature with test data, showing the Atlanta address chosen by the location field" width="616" height="534" loading="lazy" decoding="async"></div><figcaption><strong>Rendered email signature</strong> · The Atlanta address, chosen by location</figcaption></figure>
  </div>
</div>

## What's next

- [Adding comments to design templates (Liquid templates)](https://help.opensense.com/docs/add-comments-into-design-templates-liquid-templates-only)
- [Conditional fields (Liquid templates)](https://help.opensense.com/docs/conditional-fields-new-liquid-templates)

For further help, contact Opensense Support at [help@opensense.com](mailto:help@opensense.com).
