# Echo value of select field

**URL:** <https://forum.getkirby.com/t/echo-value-of-select-field/9562>\
**Category:** Questions\
**Tags:** v2\
**Created:** [January 29, 2018, 6:59pm UTC](https://forum.getkirby.com/t/echo-value-of-select-field/9562 "2018-01-29T18:59:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daybugging](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@daybugging](https://forum.getkirby.com/u/daybugging)\
**Post date:** [January 29, 2018, 6:59pm UTC](https://forum.getkirby.com/t/echo-value-of-select-field/9562/1 "2018-01-29T18:59:29Z")

</div>

hey there,  
I got a question: assuming there’s a select field with cat1: Option1 name, cat2: Option2 name as options … how do I echo Option1 name, Option2 name in a template, NOT cat1, cat2?

thx

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [January 29, 2018, 7:07pm UTC](https://forum.getkirby.com/t/echo-value-of-select-field/9562/2 "2018-01-29T19:07:29Z")

</div>

Never had to do this, but i think [value()](https://getkirby.com/docs/cheatsheet/field-methods/value) should do it

---

<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:** [January 29, 2018, 7:30pm UTC](https://forum.getkirby.com/t/echo-value-of-select-field/9562/3 "2018-01-29T19:30:00Z")

</div>

You can use a category map, in a multi-lang environment, you can use[language variables](https://getkirby.com/docs/languages/variables):

```auto
c::set('categoryMap' [
  'cat1' => 'Option 1',
  'cat2' => 'Option 2'
]);

```

Then in your template:

```auto
$categories = c::get('categoryMap');
echo $categories['cat1'];

```

`value()` doesn’t help here.

Other option include using a [plugin that reads blueprint labels](https://github.com/jenstornell/kirby-blueprint-reader) (overkill), or use the value as key as well.

```auto
options:
  "Option 1": Option 1

```

I think I have to write a cookbook article, I don’t know how many times I have answered this same question. Oh, did you know there is a search function at the top right? 😂😂

---

<div class="post-metadata">

**Author:** ![daybugging](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@daybugging](https://forum.getkirby.com/u/daybugging)\
**Post date:** [January 29, 2018, 8:07pm UTC](https://forum.getkirby.com/t/echo-value-of-select-field/9562/4 "2018-01-29T20:07:50Z")

</div>

you are the best? 😕

---

<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:** [January 29, 2018, 8:25pm UTC](https://forum.getkirby.com/t/echo-value-of-select-field/9562/5 "2018-01-29T20:25:44Z")

</div>

All fine, as you can see, I was too lazy to use it myself and just post some links 😉

---

<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:30pm UTC](https://forum.getkirby.com/t/echo-value-of-select-field/9562/6 "2025-02-06T17:30:09Z")

</div>

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


