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!