# Dynamic options via JSON API on field not working

**URL:** <https://forum.getkirby.com/t/dynamic-options-via-json-api-on-field-not-working/4305>\
**Category:** Questions\
**Tags:** v2\
**Created:** [June 2, 2016, 7:01pm UTC](https://forum.getkirby.com/t/dynamic-options-via-json-api-on-field-not-working/4305 "2016-06-02T19:01:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vandaahl](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@Vandaahl](https://forum.getkirby.com/u/Vandaahl)\
**Post date:** [June 2, 2016, 7:01pm UTC](https://forum.getkirby.com/t/dynamic-options-via-json-api-on-field-not-working/4305/1 "2016-06-02T19:01:01Z")

</div>

I’m on Kirby 2.3 and trying to get a blueprint field to accept JSON options, as described in the [docs](https://getkirby.com/docs/cheatsheet/panel-fields/checkboxes). My setup is the same as the docs:

```
title: Last name letter
pages: true
files: false
fields:
    title:
        label: Letter
        type: text
    category:
        label: Category
        type: checkboxes
        default: architecture
        options: http://192.168.1.141/dvddb/directorapi/api.json

```

api.json is:

```
{
  "id": "Design",
  "architecture": "Architecture",
  "photography": "Photography",
  "3d": "3D",
  "web": "Web"
}

```

Yet no checkboxes are displayed when editing the page. Why would that be?

---

<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:** [June 2, 2016, 7:05pm UTC](https://forum.getkirby.com/t/dynamic-options-via-json-api-on-field-not-working/4305/2 "2016-06-02T19:05:04Z")

</div>

The URL probably does not validate:

```auto
public function isUrl($url) {
    return
      v::url($url) or
      str::contains($url, '://localhost') or
      str::contains($url, '://127.0.0.1');
  }

```

Although it should. Can you test on a remote url if it is the validator or something else? Or try localhost?

**Update** : just tested this on my system and when I call [http://192.xxx/](http://192.xxx/)… it does not work either, while localhost does.

---

<div class="post-metadata">

**Author:** ![Vandaahl](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@Vandaahl](https://forum.getkirby.com/u/Vandaahl)\
**Post date:** [June 2, 2016, 7:27pm UTC](https://forum.getkirby.com/t/dynamic-options-via-json-api-on-field-not-working/4305/3 "2016-06-02T19:27:19Z")

</div>

You are right, replacing the IP with localhost resolves the problem. Thank you!

---

<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, 4:57pm UTC](https://forum.getkirby.com/t/dynamic-options-via-json-api-on-field-not-working/4305/4 "2025-02-06T16:57:53Z")

</div>

Archived on February 6, 2025, 4:57pm UTC


