# Find a pages field by variable

**URL:** <https://forum.getkirby.com/t/find-a-pages-field-by-variable/13640>\
**Category:** Questions\
**Tags:** v3\
**Created:** [April 2, 2019, 3:36pm UTC](https://forum.getkirby.com/t/find-a-pages-field-by-variable/13640 "2019-04-02T15:36:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moritzebeling](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/moritzebeling/32/5429_2.png) [@moritzebeling](https://forum.getkirby.com/u/moritzebeling)\
**Post date:** [April 2, 2019, 3:36pm UTC](https://forum.getkirby.com/t/find-a-pages-field-by-variable/13640/1 "2019-04-02T15:36:55Z")

</div>

Is there a way to access a page field, while having the field name only in a variable?  
[This](https://forum.getkirby.com/t/use-variable-to-find-field/3484/2) is a very smart way to handle a list of fields. But I was wondering, if there would also be a way to find just one single field?

I could imagine something like

```auto
$fieldname = 'description';
$page->findField( $fieldname )->kirbytext();

```

I tried with `eval()` but couldn’t get it to work, and its also not very elegant.  
Thank you for your ideas!

---

<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:** [April 2, 2019, 4:00pm UTC](https://forum.getkirby.com/t/find-a-pages-field-by-variable/13640/2 "2019-04-02T16:00:57Z")

</div>

```auto
$page->{$fieldname}()->kirbytext()

```
