In a new field - on the same page - I want to combine the values from settingspacesdefault and settingspacescustom (+ ???) in a select box and output them:
Thank you texnixe.
Hmm… so I can build up a single query (for a field) and display it in the select box.
I’m not that experienced with PageMethod and merging queries yet. Could you give me some help here?
In your model (or alternatively as a custom field method):
class NotePage extends Page // adapt model name to fit your page type
{
public function mergeFieldOptions()
{
return array_unique(array_merge($this->settingspacesdefault()->split(), $this->settingspacescustom()->split()));
}
}
Note that this will not include options from thesettingspacescustom field that are not saved yet.