# Fetching data from another page in select query

**URL:** https://forum.getkirby.com/t/fetching-data-from-another-page-in-select-query/1898
**Category:** Questions
**Tags:** v2
**Created:** [August 26, 2015, 9:34am UTC](https://forum.getkirby.com/t/fetching-data-from-another-page-in-select-query/1898 "2015-08-26T09:34:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rhjp](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/rhjp/32/420_2.png) [@rhjp](https://forum.getkirby.com/u/rhjp)
#### Post date: [August 26, 2015, 9:34am UTC](https://forum.getkirby.com/t/fetching-data-from-another-page-in-select-query/1898/1 "2015-08-26T09:34:56Z")

</div>

Hi.  
I’m currently building a site for a photographer that consists of a gallery page which is a parent page to multiple photo pages. I would like to give him the ability to tag a photo with a selection of _ **pre-set** _ categories (using the multiselect plugin).

In the gallery page I’ve created a structured field for him to specify the names of the categories he’d like to tag his pictures with

 ![](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/1X/43f7a8c50db382d26b503055ae50ae8f0e55cc08.jpg) 

Now, on the photo page, I’d like to know if it’s possible to pull through these categories into a select query, so that a nice checklist appears with those previously specified category names – i.e.:

```
categories:
  label: Categories
  type: multiselect
  options: query
  query:
    page: gallery
    fetch: [categories?]

```

 ![](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/1X/a53327cc9d7c159b30253a988350402af0a2bac2.jpg) 

(note: he wants the ability to tag a photo with multiple categories such as landscape and black & white)

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: [August 26, 2015, 10:07am UTC](https://forum.getkirby.com/t/fetching-data-from-another-page-in-select-query/1898/2 "2015-08-26T10:07:10Z")

</div>

That’s not possible out of the box. You would have to create your own field. Since you are already using a custom field, you can use this a a basis and extend it to support your categories options.

Or, you could write the options of the structure field to a json file which you can then call via its URL.  
External API support for dynamic field options

```nohighlight
You can now simply pass a URL for options to fetch a JSON array with keys and values for options:

  label: Select field
  type: select
  options: http://myoptionsapi.com/options.json

```

[http://getkirby.com/changelog/kirby-2-1-0](http://getkirby.com/changelog/kirby-2-1-0)

---

<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:04pm UTC](https://forum.getkirby.com/t/fetching-data-from-another-page-in-select-query/1898/3 "2025-02-06T17:04:30Z")

</div>


