# Questionnaire

WebSdk Quiz

WebSDK allows you to create the QUESTIONNAIRE verification step for your users to answer your questions or fill out custom data fields in which you're interested.

# Configuration

Questionnaires are set up via questionnaire constructor at the dashboard on test and production environments.

Please note that every questionnaire id attribute should be unique and if you intend to change questionnaire structure ids shouldn't be reused.

# questionnaireDef ATTRIBUTE
Name Type Required Description
id String Yes ID of questionnaire
title String No Questionnaire title
desc String No Questionnaire description
sections Array Yes Array of questionnaire sections
Name Type Required Description
id String Yes ID of the section
title String No Section title
desc String No Section description
condition String No Condition that makes section show up depending on the value of specified sectionId.itemId={options.value} (see example)
items Array Yes Array of questionnaire items (data fields)
Name Type Required Description Supported values
id String Yes ID of an item Any unique item identifier
title String No Data field title Any string value
desc String No Data field description Any string value
type String Yes Data field type See below
required Boolean No Sets data field as mandatory to fill true or false
format String No Format of the data field with validation min:3, max:9 (sets min/max amount of symbols), email
placeholder String No Placeholder for text data field Any string value
options Array No Array of values to select from [{"value": "someValue", "title": "Yes"}]
condition String No Condition that makes item show up sectionId.itemId={options.value} ( Example: 1-Section.1-2=someValue )
# SUPPORTED types of items
Value Description
text Text field
textArea Expandable text area
date Date field in format mm/dd/yyyy
dateTime Shows calendar with date and time fields
bool A single checkbox
select Using array of options creates radio buttons
selectDropdown Using array of options creates dropdown list of selectable values
multiSelect Using array of options creates multiselect of checkboxes
countrySelect Dropdown list of available countries
fileAttachment Allows to upload a file to the applicant as an attachment

# Getting results

To get results of QUESTIONNAIRE step you can use Getting applicant data method.

Items with type of fileAttachment contain value of the imageId that you can use to fetch uploaded file using that method.

# Example response

# Questionnaire Translations

You can change questionnaire texts by locale (lang parameter of SDK initialization) from the dashboard: production and test.

Have to provide JSON of questionnaire structure and texts at the questionnaires object. Every object within .questionnaires represents a questionnaire from constructor by its id.

# Translations example

Last Updated: 7/13/2021, 1:58:58 PM