Skip to main content
Version: 10.2.8

Questions and Answers

The article details instructions on setting up two major sections in a legacy Manual Task design: Questions and Answers.

Questions

The Questions section can contain question text together with Data Elements.

Data Elements are taken from the column names of the input data file. If the column headers do not match the variables within the Manual Task design, a warning message is displayed alerting you which column names need to be remapped. For details, see Upload data.

Data Elements have the following template: ${question.data['data_element_name']}.

Questions and Data Elements

In the Questions section, you can perform the following actions:

  • Type Rich Text
  • Type Data Elements
  • Delete Data Elements

On the side panel, you can only insert Data Elements at the current cursor position.

warning

Do not type or paste Data Elements into the Title or Instructions sections. The preview will not be accessible.

Answers

To add an Answer, follow the instruction below:

  1. On the Design tab, click inside the Answer section. On the side panel, you see the Answers list.

  2. Click the Add Answer button. The Add Answer window pops up.

    Add Answer Popup

  3. Fill the Answer input fields and click the Save button. When the Answer is saved, you can preview it and edit if needed.

Answer input fields

See the Answer input fields in the table below:

Input fieldDescription
CodeEnter a unique text string used as the header for the output data file. Only letters, numbers, and underscores are allowed.
AnswerSpecify a label above the Answer field. Workers see it as the Answer definition.
Answer TypeSelect a data input control to be displayed in the user interface. See the Answer Types topic for detailed information on the design and logic of each control.
OptionsSet multi-variant answers in the key-value format, for example, Option_Name1=Value1. You can populate the Options field with dynamic expressions.

To enter an option, press Enter or TAB. You can also reorder the option items by dragging them or delete them.

Options can also contain different information, depending on the Answer Type, for example:

  • Long Text: number of rows
  • Masked Text: possibility to define a mask for the Answer
  • Map: enable or disable the street view
Shuffle OptionsSelect the checkbox to shuffle the order in which the options are presented to workers.
Input form Data StoreSelect the checkbox to import Answer options from a Data Store.
DescriptionDescribe in detail what is required from a worker. The information is displayed underneath the Answer field. It supports Dynamic HTML and HTML snippets.
RequiredSelect the checkbox to activate automatic validation checks ensuring that workers cannot submit a task without providing the Answer.
Allow N/ASelect the checkbox to add an alternative answer option like "I do not know".

Advanced options

To access advanced settings, click Show Advanced Options.

Add Answer Popup

CSS rules

To add a CSS rule, perform the following actions:

  1. To customize the Answer look and feel, enter a name for your custom CSS class.
  2. After saving the Answer, switch to the Code Editor and add your CSS code for the class in the <style> section.

For sub-answers, the field should contain expand:on(Parent_Answer_Option_Value).

See the CSS Rules for Answers and sub-answers topic containing CSS Rules examples.

Default Value

The value is inserted by default and can be modified by workers. You can take the default value from the input data file using the following expression format: ${question.data.column_name}.

Dynamic expressions in Answer options

The Select One, Select Multi, Check One, and Check Multi Answer Types support dynamic expressions of the following type:

${question.data.A}=${question.data.B}
${question.data.A}=1; 2=${question.data.A}
PREFIX${question.data.A}SUFFIX${question.data.B}=${question.data.C} // PREFIX, SUFFIX - any strings

In the example above, A and B are column names from the input data file. On the Preview and endpoints, these expressions are substituted by the values from corresponding columns.

Dynamic expressions are useful in case these answers should have multiple values: no need to enter them manually.

Example:

Input File

Input file or Data StoreWhat worker seesWhat worker selectsResult
Title: Yahoo, Facebook

URL: http://yahoo.com , http://google.com

Yahoo, FacebookYahoohttp://yahoo.com

To use these columns in Answers, add the following dynamic expressions to the Options list:

Dynamic Expressions in Answer Options

The following figure displays dynamic expressions in the Design tab and on the Preview page:

Preview with Dynamic Expressions

Sub-answers

Answers with multiple options can have sub-answers. A sub-answer is displayed to a worker only when a particular option from the parent Answer was selected.

example

Question: "Count the objects and select their amount from the list"

Parent Answer options: 1=1 2=2 3=3 4=4 Other=5

Sub-answer: If 5 is selected from the main question, then display a text input (a sub-answer).

To add a sub-answer to an existing Answer, perform the following steps:

  1. On the Design tab, click inside the Answer section. On the side panel, you will see the Answers list.

  2. Move the mouse over the Answer's corresponding row.

  3. Click the plus icon "+" as shown below.

  4. The Answer input fields are displayed.

    1. Expand the Show Advanced Options section.

    2. In the CSS Rule field, insert the following string: expand:on(Parent_Answer_Option_Value), where Parent_Answer_Option_Value is any option of the parent Answer.

    Example:

    The parent Answer has the Check One type with the following Options: black=1 white=2 other=3

    To display the sub-answer when the third option (other) is selected in the parent Answer, go to the CSS Rule field of the sub-answer and add the following: expand:on(3).

  5. Click Save when all pertinent fields are filled in.

Each Answer field added is displayed in a table format under the parent answer node. You can edit, reorder, and delete sub-answers. There can be multiple levels of sub-answers.

Validation rules

Validation in Answers is active by default, and users cannot enter incorrect values. For example, email, date, number, so on.

When the validate parameter is set to false, users can enter any data in any field. To disable the validation, add the following parameter in the Code Editor:

<@form validate=false>

Save the Manual Task to apply the changes.