This is basically copy of the field as defined in the blueprint for the template that should be a result of this dialog.
The dialog shows up fine:
However, if I click the field or (add) button, I get this error:
I have no idea whatâs wrong/missing, or how else can I implement a page selector in this dialog - Using select with type: query, or even PHP generated options also doesnât seem to work.
Okay, Iâve trailed through Vue DevTools and now have a very vague idea about what this error message is about, but I canât properly decode how to setup the endpoints prop.
Sidenote: I managed to get the select working by studying the custom add fields plugin
Okay. I now managed to make the error go away by simply stealing the endpoint from existing page/field and it⌠works. Iâd rather do actual proper endpoint, but have no idea if there is a documentation like âpreparing custom endpoint for usage in a page field in a custom dialogâ
But whatâs currently bigger problem, no matter how I close the âselect pageâ dialog (cancel or submit), my custom dialog closes as well.
After consulting on Discord, Kirby currently doesnât support stacking dialogs, so Pages field (with its âselect pageâ dialog) wonât work inside the custom dialog.
For others landing on this topic: use select or multiselect field (or other options like toggles, if it fits your needs)