Skip to main content

Function: submitSurvey()

Call Signature​

function submitSurvey(
context,
siteUrl,
activityId,
type,
responses
): Promise<{
changed: string;
messages: string[];
}>;

Defined in: areas/surveys/surveys.ts:195

Fills the survey page by page with responses (field name → value) and submits it on the last page. Every name is checked against the form first, so nothing is sent with a wrong one.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
typeSurveyType
responsesRecord<string, string>

Returns​

Promise<{ changed: string; messages: string[]; }>

Call Signature​

function submitSurvey(
context,
siteUrl,
activityId,
responses,
options?
): Promise<{
changed: string;
messages: string[];
}>;

Defined in: areas/surveys/surveys.ts:196

Fills the survey page by page with responses (field name → value) and submits it on the last page. Every name is checked against the form first, so nothing is sent with a wrong one.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
responsesRecord<string, string>
options?{ type?: SurveyType; }
options.type?SurveyType

Returns​

Promise<{ changed: string; messages: string[]; }>