I’m getting an Invalid options format in file: kirby/src/Form/OptionsApi.php line: 132
. This line checks if the format is an array.
The blueprint is as follows:
order:
options: api
type: multiselect
label: Order
api:
url: "{{ site.url }}/product/{{ page.autoid }}"
text: "{{ item.title }}"
value: "{{ item.title }}"
The returned JSON is this:
[
{"title":"Product A"},
{"title":"Product B"},
{"title":"Product C"},
{"title":"Product D"}
]
My JSON is definitely [1] valid, [2] an array of key:value pairs, and [3] the route definitely returns the JSON I’m expecting.
I’ve tried setting the route with .json
extension; no difference.
I’ve tried various combinations of arrays and objects; no difference.
I’ve tried nesting the JSON and using fetch
; no difference.
I’ve tried manually putting a simple JSON array and returning that as a control test; no difference.
Nothing seems to work.
I have done this several times before on Kirby projects, so this isn’t my first rodeo.
Any ideas? Are there active issues with this feature?