rapha
March 19, 2021, 3:45pm
1
Hi there
i try to query inside a tags field values from another tag field.
Inside the panel i just see the empty mainmaincategories field (i know silly name) if i start typing the values from the fetched field shown up.
mainmaincategories:
label: Hauptkategorien
type: tags
accept: options
options: query
query:
fetch: kirby.collection("categories/maincategories")
text: "{{ arrayItem.value }}"
value: "{{ arrayItem.value.slug }}"
but i like to have the fetched tags like they should normaly look…
what do i make wrong.
Thank you all
N247S
March 20, 2021, 12:03pm
2
I think you meant to switch the text
and value
parameters? Like:
text: "{{ arrayItem.value.slug }}"
value: "{{ arrayItem.value }}"
rapha
March 23, 2021, 9:51am
3
@N247S thank you for that suggestion but i still get the empty tag field when i reload.
What i want is that Tag Field prefilled with data from that other tag field when i open that tab in backend.
That’s probably a misunderstanding? The purpose of the query option is not to prefill the field, but to query options that can then be selected.
Pre-filling fields is only possible via the default
property at page creation, but I’m not sure if that works dynamically.
rapha
March 23, 2021, 12:31pm
5
texnixe:
That’s probably a misunderstanding? The purpose of the query option is not to prefill the field, but to query options that can then be selected.
Pre-filling fields is only possible via the default
property at page creation, but I’m not sure if that works dynamically.
Thank’s @texnixe for clearing my brain. i guess you are right.