I'm trying to create a generic hook for setting a default value on a field on save, but whenever someone saves the document, the field key is not there when the field has not been filled in by the user.
Would it possible to to get the available fields for a collection while in a hook?
Well, I think I answered my own question. For future reference:
You can get the
object in a hook, which includes a
So you can access the configured fields like this: