# Access select label in section info

**URL:** <https://forum.getkirby.com/t/access-select-label-in-section-info/14111>\
**Category:** Questions\
**Tags:** v3\
**Created:** [May 6, 2019, 11:37pm UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111 "2019-05-06T23:37:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgsiegel](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dgsiegel/32/7018_2.png) [@dgsiegel](https://forum.getkirby.com/u/dgsiegel)\
**Post date:** [May 6, 2019, 11:37pm UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/1 "2019-05-06T23:37:48Z")

</div>

Hi!

I’ve created a blueprint for a talk, featuring a select element:

```
fields:
  type:
    label: Session Type
    type: select
    options:
      breakout: Breakout Session
      focus: Focus Talk
      lightning: Lightning Talk
      workshop: Workshop
[...]

```

In an overview, I want to show all talks, featuring an info with the date and type of the talk:

```
info: "{{page.type}} // {{ page.date.toDate('D d M Y') }} {{ page.time.toDate('H:i') }}"

```

But this only uses the keys set in the select field (e.g. `lightning`). Is there a way to access the label instead of the key?

---

<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:** [May 7, 2019, 6:05am UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/2 "2019-05-07T06:05:31Z")

</div>

Options:

> [@Multiselect doesn't store values but the keys](https://forum.getkirby.com/t/multiselect-doesnt-store-values-but-the-keys/14045/2):
>
> You can’t store the values, unless you use your values as keys in your blueprint. options: "Interactive": Interactive "Print": Print # etc. Edit: if this doesn’t work, there is the [long version below](https://forum.getkirby.com/t/multiselect-doesnt-store-values-but-the-keys/14045/4). 2. You can get the values from the keys via the [$page-\>blueprint()](https://getkirby.com/docs/cookbook/templating/blueprints-in-frontend#get-a-single-field-by-field-name) method. 3. You could alternatively store your key-value pairs in an array in your config and fetch via the options() helper.

Example for option 2:

> [@Select field's key/value](https://forum.getkirby.com/t/select-fields-key-value/12708/6):
>
> That would be dump($page-\>blueprint()-\>field('hosts')['fields']['host']['options']['apple']);

Example for option 3:

In config.php:

```auto
return [

    'session_types', => [
        'option1' => 'Some title 1',
        'option2' => 'Some title 2',
        'option3' => 'Some title 3'
    ]
];

```

In template:

```auto
<?= option('session_types')['option1'] ?>

```

Where you would replace `option1` with `$page->type()->value()`.

---

<div class="post-metadata">

**Author:** ![dgsiegel](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dgsiegel/32/7018_2.png) [@dgsiegel](https://forum.getkirby.com/u/dgsiegel)\
**Post date:** [May 7, 2019, 7:50am UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/3 "2019-05-07T07:50:43Z")

</div>

Option 2 and 3 are hard to use inside a blueprint (especially the info section), but Option 1 looks great. Thanks!

---

<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:** [May 7, 2019, 8:02am UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/4 "2019-05-07T08:02:30Z")

</div>

Option 3 is the most versatile though, especially when used in a multi-lang environment (where this mapping would go into the translations) and doesn’t require reading the blueprint.

---

<div class="post-metadata">

**Author:** ![dgsiegel](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dgsiegel/32/7018_2.png) [@dgsiegel](https://forum.getkirby.com/u/dgsiegel)\
**Post date:** [May 7, 2019, 10:17am UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/5 "2019-05-07T10:17:12Z")

</div>

How would this look like when referring to it in an info line inside a section?

---

<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:** [May 7, 2019, 10:20am UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/6 "2019-05-07T10:20:09Z")

</div>

Ah, I completely missed that info stuff. But it’s doable if you create a [custom field method](https://getkirby.com/docs/reference/plugins/extensions/field-methods), that fetches the value.

---

<div class="post-metadata">

**Author:** ![dgsiegel](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dgsiegel/32/7018_2.png) [@dgsiegel](https://forum.getkirby.com/u/dgsiegel)\
**Post date:** [May 7, 2019, 11:35am UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/7 "2019-05-07T11:35:56Z")

</div>

Right, then Option 1 is still the easiest 🙂

---

<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:** [May 7, 2019, 11:43am UTC](https://forum.getkirby.com/t/access-select-label-in-section-info/14111/8 "2019-05-07T11:43:21Z")

</div>

> [@dgsiegel](#):
>
> Right, then Option 1 is still the easiest 🙂

Yes, but not very versatile. If you later regret your wording, you would have to change the blueprint and all your already stored values.

That is definitely an advantage of option 3 compared to the other options.
