Hi, I was wondering if it's possible to add conditional display to a custom field. When you create a field with a condition, it's possible to acces that condition within the field. However that field doesn't have access to data
or siblingData
. Is there a where to apply the condition to a custom field?
Blog reference: https://payloadcms.com/blog/building-a-custom-field
Hey @edblocker it sure is!
We've just released a beta (0.11.2-beta.0
) that now exports Payload's internal withCondition
. We've also updated the field docs to call out to how this all works, but that will not be published on our site until we deploy a new minor version. So for now you can read about it right on GitHub.
Give it a shot - I'd like to hear what you think!
That is exactly what I'm looking for. I'll wait for the next release to integrate this in my project, thank you.