# Extending fields - adding icon

**URL:** <https://forum.getkirby.com/t/extending-fields-adding-icon/20605>\
**Category:** Questions\
**Tags:** v3\
**Created:** [December 31, 2020, 5:59pm UTC](https://forum.getkirby.com/t/extending-fields-adding-icon/20605 "2020-12-31T17:59:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![S1SYPHOS](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/s1syphos/32/3671_2.png) [@S1SYPHOS](https://forum.getkirby.com/u/S1SYPHOS)\
**Post date:** [December 31, 2020, 5:59pm UTC](https://forum.getkirby.com/t/extending-fields-adding-icon/20605/1 "2020-12-31T17:59:49Z")

</div>

Hey there,  
I want to extend a simple text field inside `Kirby::plugin`, using this:

```php
    'fields' => [
        'myfield' => [
            'extends' => 'text',
            'props' => [
                'icon' => 'home',
            ],
        ],
    ],

```

… but that doesn’t work - it should just be a text field with the specified icon -.-

thx!

---

<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 1, 2021, 6:47pm UTC](https://forum.getkirby.com/t/extending-fields-adding-icon/20605/2 "2021-01-01T18:47:18Z")

</div>

Have you also created an index.js? And what exactly doesn’t work? No icon? No field?

---

<div class="post-metadata">

**Author:** ![pedroborges](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/pedroborges/32/7038_2.png) [@pedroborges](https://forum.getkirby.com/u/pedroborges)\
**Post date:** [January 1, 2021, 7:07pm UTC](https://forum.getkirby.com/t/extending-fields-adding-icon/20605/3 "2021-01-01T19:07:41Z")

</div>

I’m not sure if replacing the icon is best done on the JS or PHP field file. However, you are extending the wrong component in the JS file, it needs to match the name found in [`kirby/panel/src/config/components.js`](https://github.com/getkirby/kirby/blob/0d2751af7cb478df14f30fac47fe9a2cd3b38114/panel/src/config/components.js#L212).

```auto
'extends' => 'k-text-field',

```

---

<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 1, 2021, 7:36pm UTC](https://forum.getkirby.com/t/extending-fields-adding-icon/20605/4 "2021-01-01T19:36:16Z")

</div>

> [@pedroborges](#):
>
> `'extends' => 'k-text-field',`

But not in the PHP file, in the js file.
