interface

FieldDocumentForm

Read the current document form, including edits that have not been saved. Returned objects are copies: mutating them does not change the form. In field editors these reads throw once the editor's connection to the form expires.

Properties

PropertyTypeDescription
contentLocalestringThe content locale being edited, such as "fr"; separate from the admin UI language.
resourceFieldFormResourceWhich collection document or global is being edited, when supplied by this form.
get(path: string) => unknownRead a copy of a value by its current document-root path, such as "title" or "reviews.0.note". Returns undefined for a missing value. A numbered path reads whichever row is at that position now; it does not remember row identity. Check the returned value's type before using it.
issuesFor(path: string) => readonly ValidationIssue[]Current validation issues at or below a document-root path, including server issues.
snapshot() => Record<string, unknown>Copy all current form values, including unsaved edits. The result is a snapshot: it does not update when the user types, and changing it does not update the form. This is form data, not a fresh document fetched from the server.

Full signature

Methods

  • FieldDocumentForm.get()

    Read a copy of a value by its current document-root path, such as "title" or "reviews.0.note". Returns undefined for a missing value. A numbered path reads whichever row is at that position now; it does not remember row identity. Check the returned value's type before using it.

  • FieldDocumentForm.issuesFor()

    Current validation issues at or below a document-root path, including server issues.

  • FieldDocumentForm.snapshot()

    Copy all current form values, including unsaved edits. The result is a snapshot: it does not update when the user types, and changing it does not update the form. This is form data, not a fresh document fetched from the server.