Skip to content

Latest commit

 

History

History
77 lines (39 loc) · 3.32 KB

Forms.md

File metadata and controls

77 lines (39 loc) · 3.32 KB

Forms

The following methods are available on ApiClient instances to manage forms. Unless otherwise specified, all received and returned model classes are within the ...\Models\Forms namespace.

  • getForms

    getForms(?string|Models\Workspaces\WorkspaceStub $workspace = null, ?string $search = null, ?int $page1 = null, ?int $pageSize = null): PaginatedResponse<FormStub>

    Load all forms, optionally limited to a specific workspace. (API docs)

  • getForm

    getForm(string|Form|FormStub $form): Form

    Load a single form. (API docs)

  • createForm

    createForm(array $data): Form

    Create a new form. See the API docs for the possible values within $data. (API docs)

  • deleteForm

    deleteForm(string|Form|FormStub $form): void

    Delete an existing form. (API docs)

  • updateForm

    updateForm(string|Form|FormStub $form, list<Operation>|Operation $operations): void

    Update an existing form with one or more operations. (API docs)

  • overwriteForm

    overwriteForm(string|Form|FormStub $form, array $data): void

    Replace all settings of an existing form. See the API docs for the possible values within $data. (API docs)

  • getFormMessages

    getFormMessages(string|Form|FormStub $form): array<string, string>

    Load all form messages for a specific form. See the API docs for the possible message keys. (API docs)

  • updateFormMessages

    updateFormMessages(string|Form|FormStub $form, array<string, string> $messages): void

    Update the form messages for a specific form. See the API docs for the possible message keys. (API docs)

  • getResponses

    getResponses(string|Form $form, array $options): PaginatedResponse<Response>

    Load responses for a specific form. See the API docs for the possible $options values. (API docs)

  • deleteResponses

    deleteResponses(string|Form|FormStub $form, list<string|Response> $responses): void

    Delete specific responses from a specified form. (API docs)

  • getResponseFile

    getResponseFile(string|Form|FormStub $form, string|Response $response, string|Field $field, string $filename): string

    Load the raw source for a specific form response file. (API docs)

  • getFormInsights

    getFormInsights(string|Form $form): InsightsSummary

    Load the insights summary a specific form. (API docs)

All Form and FormStub instances also provide a ->getEmbed() method to allow generating HTML embeds. See the Embeds docs for more details.