Hi!
I have a multiselect field of ‘artists’ which lets the user pick 5 artist pages:
artists:
label: Pick 5 artists
type: multiselect
options:
type: query
query: site.page('artists').children.template("artist")
In addition to that I have a second field of ‘5 book picks’ that lets the user pick 5 book pages:
recommendations:
label: Pick 5 book recommendations
type: multiselect
max: 5
options:
type: query
query: site.page('books').children.template("book")
each book from the picks has an artist field with artist page as a value. I wish to collect all the artist pages from the ‘5 book picks’ and make it as the value of the first field (multiselect field of ‘artists’).
On top of it, if possible, I wish that this automatically filled field (‘artists’) will be invisible in the panel.
In template I managed (thanks to the forum) to get the artist value of each book:
$recommended_books = $page->recommendations()->toPages(',');
$pick_artists = $recommended_books->pluck('artist', ',', true);
But how can I use it in the panel?
Thanks a lot! ![]()