# Selection field text

**URL:** <https://forum.getkirby.com/t/selection-field-text/2370>\
**Category:** Questions\
**Tags:** v2\
**Created:** [November 1, 2015, 8:30pm UTC](https://forum.getkirby.com/t/selection-field-text/2370 "2015-11-01T20:30:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tnViking](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tnviking/32/4407_2.png) [@tnViking](https://forum.getkirby.com/u/tnViking)\
**Post date:** [November 1, 2015, 8:30pm UTC](https://forum.getkirby.com/t/selection-field-text/2370/1 "2015-11-01T20:30:44Z")

</div>

I’ve setup a select field in the panel with a few options

```
options:
    company: Company News
    weekly: Weekly Update
    product: Product Update

```

I can call it an get stuff like company, weekly and product.  
But how can I get Company News, Weekly Update etc?

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [November 1, 2015, 8:50pm UTC](https://forum.getkirby.com/t/selection-field-text/2370/2 "2015-11-01T20:50:21Z")

</div>

In the first line, `company` is the value that gets stored in the content text file and `Company News` is the value that gets displayed in the select field in the Panel. You can’t get the display value from your template.

The reason is that sometimes you need to have a unique key to use in conditional template code.

You can use the following code however:

```nohighlight
  options:
    Company News: Company News
    Weekly Update: Weekly Update
    Product Update: Product Update

```

I think using the following should also work, but it seems like it doesn’t:

```nohighlight
  options:
    Company News
    Weekly Update
    Product Update

```

I have created an [issue over on GitHub](https://github.com/getkirby/panel/issues/604) about this.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 1, 2015, 8:51pm UTC](https://forum.getkirby.com/t/selection-field-text/2370/3 "2015-11-01T20:51:15Z")

</div>

You can also use a category map as described here [http://getkirby.com/forum/archive/general/20141013/is-there-an-easy-way-to-get-the-label-of-checkboxes](http://getkirby.com/forum/archive/general/20141013/is-there-an-easy-way-to-get-the-label-of-checkboxes)

This is particularly useful if you are developing for a multi-language site, then you can define the string translations in your language files.

---

<div class="post-metadata">

**Author:** ![tnViking](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tnviking/32/4407_2.png) [@tnViking](https://forum.getkirby.com/u/tnViking)\
**Post date:** [November 1, 2015, 11:03pm UTC](https://forum.getkirby.com/t/selection-field-text/2370/4 "2015-11-01T23:03:39Z")

</div>

Thanks, using the category map now.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:04pm UTC](https://forum.getkirby.com/t/selection-field-text/2370/5 "2025-02-06T17:04:20Z")

</div>

Archived on February 6, 2025, 5:04pm UTC


