Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Function preCreateDocument

    • A hook event that fires for every Document type before execution of a creation workflow. Substitute the Document name in the hook event to target a specific Document type, for example "preCreateActor". This hook only fires for the client who is initiating the creation request.

      The hook provides the pending document instance which will be used for the Document creation. Hooked functions may modify the pending document with updateSource, or prevent the workflow entirely by returning false.

      Parameters

      Returns boolean | void

      Explicitly return false to prevent creation of this Document