# Panel - Are tags field dynamic options could be added manually by user?

**URL:** <https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066>\
**Category:** Questions\
**Tags:** v4\
**Created:** [December 12, 2024, 8:25pm UTC](https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066 "2024-12-12T20:25:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![martino](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@martino](https://forum.getkirby.com/u/martino)\
**Post date:** [December 12, 2024, 8:25pm UTC](https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066/1 "2024-12-12T20:25:27Z")

</div>

Hello everyone 😃

I am working on a project with multiple tags fields to filtering projects. In order to avoid syntax mistakes I need to allow the user to enter manually a tag (achieve with `accept: all`), and in the meantime add this added tag to the dropdown list of options.

Is this possible ?  
What is a good starting point ?

Here is my little piece of code ::

```yml
projectTags: 
        label: my project tag
        type: tags
        options:
          - i need those to be added manually by the user

```

Thanks for your help 🙂

++  
M

---

<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:** [December 12, 2024, 9:51pm UTC](https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066/2 "2024-12-12T21:51:29Z")

</div>

I somehow don’t understand what you want to achieve. The field you are showing here doesn’t have `accept: all`?

Are you referring to the same field in other pages? Then you would query the siblings, so that once the user has added a tag manually on one page, it is available as suggestion in sibling pages.

---

<div class="post-metadata">

**Author:** ![martino](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@martino](https://forum.getkirby.com/u/martino)\
**Post date:** [December 12, 2024, 9:56pm UTC](https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066/3 "2024-12-12T21:56:28Z")

</div>

Thanks for your reply 😉  
Yes you’re right, but it seems like accept default state is ‘all’

No the field is only present on this page, and I would like to add each new added tag to the dropdown list, is this clearer ?

---

<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:** [December 12, 2024, 11:22pm UTC](https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066/4 "2024-12-12T23:22:53Z")

</div>

> [@martino](#):
>
> No the field is only present on this page, and I would like to add each new added tag to the dropdown list, is this clearer ?

Sorry, no, this is even more confusing. Why would you want to fill an option list for a field only present on a single page if the user adds the option manually?

Can you maybe explain the purpose of this exercise? Is this to predefine some options that can then be used somewhere else?

---

<div class="post-metadata">

**Author:** ![martino](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@martino](https://forum.getkirby.com/u/martino)\
**Post date:** [December 13, 2024, 9:38am UTC](https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066/5 "2024-12-13T09:38:16Z")

</div>

I’m sorry to be confusing.  
It’s a projects page, each project contains tags, that let me filter the projects by tag. Because tags are case sensitive, and because the user could make mistakes entering tags, I would like each newtag added to be present in the dropdown list to avoid write it a second time in order to prevent mistakes (like add a extra “s” or forgotting a letter.  
In this first screenshot, you can see the “Tags medium” field with the dropdown list that contains a list of predefined tags setup with “options” in the page (project.yml) blueprints.

 ![Capture d’écran 2024-12-13 à 10.25.22](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/7/75fc62eedc367f8cedcb900d0e1a38c4f07a2c5b.png)  
In this second screenshot, i added a “newtag” manually. What I want is, this newtag to be available in the dropdown list for all the other new created page (project), so that the user can choose it without need to write it a second time.  
 ![Capture d’écran 2024-12-13 à 10.26.06](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/d/dd00e07e679a6074317ed9fc42acb361d87f09fa.png)

I hope it’s clearer now 🙂

Thanks for being patient,  
++  
M

---

<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:** [December 13, 2024, 12:17pm UTC](https://forum.getkirby.com/t/panel-are-tags-field-dynamic-options-could-be-added-manually-by-user/33066/6 "2024-12-13T12:17:44Z")

</div>

Ok, so not a single page.

To mix some pre-defined options with the values entered in siblings pages, you can create a custom method in a page model, e.g. getOptions, that merges an array of fixed options with the values plucked from siblings pages:

```auto
          tags:
            type: tags
            options:
              type: query
              query: page.getOptions()

```

```auto
	public function getOptions()
	{
		$optionsFromSiblings = parent::siblings()->pluck('tags', ',', true);

		return array_merge($optionsFromSiblings, ['a', 'b', 'c']);
	}

```
