Hi, is there a way to have a select or relationship field with all the collections as its options?
If none, is it possible to have a select field where I manually add my collections and when I select a specific collection, conditionally add a relationship field with it's relationTo property set to the selected collection?
Currently, there is not a way to "allow all" within the
relationTo
property. Relation slugs must be listed.
You may be able to combine conditional logic and relationship filtering options to achieve something close. Conditional logic for when to show the relationship field, then filterOptions to constrain the relationTo slugs.
Here are some docs for you:
Thank you. I'll have a look at it.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.