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(?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(string|Form|FormStub $form): Form
Load a single form. (API docs)
-
createForm(array $data): Form
Create a new form. See the API docs for the possible values within
$data
. (API docs) -
deleteForm(string|Form|FormStub $form): void
Delete an existing form. (API docs)
-
updateForm(string|Form|FormStub $form, list<Operation>|Operation $operations): void
Update an existing form with one or more operations. (API docs)
-
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(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(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(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(string|Form|FormStub $form, list<string|Response> $responses): void
Delete specific responses from a specified form. (API docs)
-
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(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.