**Source URL:** https://ecoa.veevavault.help/en/lr/912970/

# Understanding Survey Parameters

This page includes extended descriptions for survey parameters. To see information about how to configure surveys, see Configuring Surveys.

## Universal Survey Parameters {#universal-survey-parameters}

All surveys that you configure using JSON have universal parameters, which are described below:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
        <td>Survey Type
        <td>String, with set options:
          
            ePRO
            eClinRO
            composite

<td>
          
            Identifies whether the survey is an ePRO or eClinRO survey.
            If no survey type is added, ePRO is selected by default.
          
        <td>"surveyType": "ePRO"
        
        <td>Optional
    
    <tr>
        <td>Survey Subtype
        <td>String, with set options:
          
            standard
            training
            diary

<td>
          
            Identifies whether the survey is a standard survey, training survey, or as-needed diary survey.
            If no survey subtype is added, standard is selected by default.
            The training and diary survey subtypes are only available for surveys with a type of ePRO.
            The diary subtype can be used for as-needed, for, and between schedules.
          
        <td>"surveySubtype": "standard"
        
        <td>Optional

Not allowed when survey type is composite.
    
    <tr>
        <td>Language Override
        <td>String, with set options:
          
            Patient
            Site

<td>
          
            Overrides the default language setting, allowing an eClinRO to use patient languages instead of site languages.
            If no language override is provided, the following options are selected by default:
              
                eClinRO: Site
                ePRO: Patient

<td>"languageOverride" : "Patient"
        <td>Optional

Not allowed when survey type is composite.
      
    <tr>
        <td>Label
        <td>String
        <td>The official label of the survey. This label is displayed in the collection and is not displayed for respondents.
        <td>"label": "Pain Survey"
        <td>Required
    
    <tr>
        <td>Description
        <td>String
        <td>A description of the survey that provides additional context about the survey in the JSON. The description is not displayed to respondents.
        <td>"description": "A survey about a patient's Pain while participating in a clinical trial"
        <td>Optional
    
    <tr>
        <td>License Text
        <td>String
        <td>
            
                The licensing and copyright information of the survey, if applicable.
                The license text is displayed in the survey under the title.

<td>"licenseText": "&copy;Verteo Biopharma. Pain Survey&trade; is a trademark of the Verteo Institution of Health."
        <td>Optional
    
    <tr>
      <td>License Image
      <td>URL string
      <td>
        
          The container for the survey license image URL and description, if applicable.
          Image: the URL of the license image uploaded to Studio.
          Description: A description of the license image that can be read by screen readers for visually-impaired respondents.
            
              Survey License is added by default if no description is provided.

<td>"licenseImage": {

          &nbsp;&nbsp;"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyLicenseLogo.jpg",

          &nbsp;&nbsp;"description": "Pain Survey License Image"

          }
      
      <td>Optional
    
    <tr>
      <td>Review Prompt
      <td>Boolean, with set options:
        
          true
          false

<td>Determines whether a prompt is displayed at the end of the survey instructing the respondent to review their responses before submitting.
      <td>"reviewPrompt": true
      <td>Required
    
    <tr>
      <td>Additional Details
      <td>String
      <td>
        
          Additional details or licensing information for the survey, if applicable.
          A survey's additional details are displayed on the eCOA collection document for sponsors and sites.
            
              Additional details are not displayed on the survey itself for respondents.

<td>"additionalDetails": "Licensed and reviewed for use in study FEZZIK-07. All rights reserved."
      <td>Optional
    
        <tr>
      <td>Diary Settings
      <td>Diary Label: String
        Action Label: String
        Description: String
        Show Responses: Boolean, with set options:
            
                true
                false
            
        Summary Blocks: String array, one item allowed
        Add New Description: String
      
      <td>
          
              This parameter is only allowed and optional for surveys with a subtype of diary. It is required if a Display Label contains a timepointLabel.
              See Appendix A for an example of an as-needed diary configuration.
              Diary label
                  
                      The label that is displayed with the diary item on the To Do page.
                      If this value is configured, the Survey Display Label is only used for individual diary instances.
                      Diary label is required if the Survey Display Label contains a timepointLabel or dayOfWeek token.

Action label
                    
                          Additional text that is displayed with the diary item on the To Do page.
                          Veeva recommends using this to provide guidance on when to complete the diary.
                          Optional.

Description
                    
                          The diary description that is displayed on the diary page
                          Simple HTML formatting and links can be included
                          Optional.

Show responses
                    
                          The setting that determines whether a participant can open and view responses to diaries they already submitted.
                          Optional. If not provided, then it is treated as false.

Summary blocks
                    
                          The block in this survey that is used to summarize the instance to help users understand what the survey is about.
                          The summary block cannot be in a repeat section or controlled by a condition. Some block types are not allowed, such as interactive images.
                          Optional.

Add New Description
                  
                      The description that is displayed underneath the action to start a new as-needed diary.
                      Max length of 100 characters
                      Optional, only allowed when an asNeeded schedule is configured

<td>
        "diarySettings": {
&nbsp;&nbsp;"diaryLabel": "Medication Diary",
&nbsp;&nbsp;"actionLabel": "Complete this if you take a medication",
&nbsp;&nbsp;"description": "Consider the medications you take when answering these diary questions.",
&nbsp;&nbsp;"showResponses": true,
&nbsp;&nbsp;"summaryBlocks": ["block1"]
&nbsp;&nbsp;"addNewDescription": “Add a catch-up diary when you need to record taking an over-the-counter medication that was not specifically prescribed to you.”
}
      
      <td>Optional when the surveySubtype is diary, required when a token is used in the Survey Display Label

Not allowed when a survey is not a diary subtype
    
    <tr>
        <td>Sections Array
        <td>None
        <td>
          
            The container of all sections in a survey.
            A survey can have one or more sections, which contain the blocks array.
            Section parameters are defined in the Universal Section Parameters section below.

<td>"sections": []
        <td>Required
    
        <tr>
        <td>Parts Array
        <td>Array of part objects
        <td>
          
            The container of all parts in a survey.
            A survey can have more than one part, to which sections are assigned.
            For multi-part surveys for single respondents, the order of the parts arrays determines the order the parts will be displayed in for the respondent.
            For composite surveys with multiple respondents, all parts are sent to all respondents at the same time.
            Cannot be used for surveys with a subtype of training
            Parts parameters are defined in the Universal Part Parameters section below.

<td>"parts": []
        <td>Required if survey type is composite.

Required if survey should have multiple parts.
    
        <tr>
        <td>Conditions Array
        <td>Array of condition objects
        <td>
          
            The conditions container that determines whether to show or hide controlled questions based on the specific responses a respondent provides.
            A survey can have one or more sections, which contain the blocks array.
            See Configuring Conditions for more information.

<td>"sections": []
        <td>Required
    
        <tr>
        <td>Validations Array
        <td>Array of validation objects
        <td>
          
            The validation container that holds block references to determine whether to show an error message until the validation requirements are met.
            For surveys with more than one part, the validation must only reference blocks that are used in the same survey part.
            Validations parameters are defined in the Validation Parameters section below.

<td>"sections": []
        <td>Required

## Universal Section Parameters {#universal-section-parameters}

All sections in a survey that you configure using JSON have universal parameters, which are described below.

See the Configuring Tables section on the Configuring Surveys page for more information on how to make table sections.

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Unique name
      <td>String
      <td>The section must be assigned a unique name, which is only used by the system and is not displayed to respondents.
      <td>"name": "section1"
      <td>Required
    
    <tr>
      <td>Type
      <td>String, with set options:
        
          serial
          table
          repeat

<td>
        
          Describes the type of section, and how the section will be displayed:
            
                serial: Questions are displayed one by one.
                table: Questions are displayed all at once in a grid.
                repeat: Questions are displayed as a repeating set, allowing the same set of data to be collected multiple times.

The table type can only be used if the surveyType is eClinRO.
          If no type is added, then the section is treated as serial by default.

<td>"type": "serial"
      <td>Optional
    
    <tr>
      <td>Condition
      <td>Boolean, with set options:
        
          true
          false

<td>
        
          If the condition evaluates to true, the section is displayed for the respondent.
          Refers to one of the conditions in the survey's conditions array.
          Condition cannot reference a block that is in the current section, a future section, a repeat section, or a different part.
          See Configuring Conditions for more information.

<td>"condition": null
      <td>Optional
    
    <tr>
      <td>Heading
      <td>String
      <td>
        
          The heading that is displayed at the top of the section.
          Max characters: 200.
          See Supported HTML Tags on the Configuring Surveys page for information about what formatting is supported.
          Images cannot be used in section headings.

<td>"heading": "Over the last 7 days have you…"
      <td>Optional
    
    <tr>
      <td>Sticky Heading
      <td>Boolean, with set options:
        
          true
          false

<td>
        
          Determines whether the section heading will stay visible when you scroll down the page.
          If the parameter is not provided, it is treated as false by default.

<td>"stickyHeading": true
      <td>Optional
    
    <tr>
      <td>Repeat Section Settings
      <td>Question Number: String

Heading: String

Summary Block: String

Minimum Entry: Whole Positive Number from 0 to 100.

Maximum Entry: Whole Positive Number between 1 and 100.
      <td>
        
          Defines how the set of repeating questions is displayed and how many times a respondent can answer.
          Heading, summary block, minimum entry, and maximum entry are required. Question number is optional.
          Question Number
            
              Each question block can be given a number that is displayed before the heading in the following format:
                  
                      1. Heading here.

Heading
            
              Text that provides instructions for the set of repeating questions.

Summary block
            
              The block in this section that is used to summarize the set of repeating questions when the user answers them.

Minimum entry
            
              The minimum number of times a respondent must answer the set of repeating questions (entries).
              0 means the set of questions is optional.

Maximum Entry
            
              The maximum number of times a respondent can answer the set of repeating questions (entries).

<td>"repeatSettings": {

      &nbsp;&nbsp;"questionNumber": "1",

      &nbsp;&nbsp;"heading": "Enter any physical activities you performed in the previous day. If completing this diary in the morning, please only enter activities until midnight yesterday.",

      &nbsp;&nbsp;"summaryBlock": "q1",

      &nbsp;&nbsp;"minEntry": 0,

      &nbsp;&nbsp;"maxEntry": 20,

      &nbsp;&nbsp;},

<td>
          
              Required if section type is repeat
              Not allowed when section type is serial or table

<tr>
      <td>Table Columns
      <td>Heading:
String

Width:
Floating point number
      <td>
        
          Defines an array of up to 6 columns that are displayed in the table.
          A heading and width value must be provided for each column. 
          Heading
            
              Can have a maximum of 200 characters.
              See Supported HTML Tags on the Configuring Surveys page for information about what formatting is supported.

Width
            
              The sum of the widths across all columns has to be 1.
              You can use up to 2 decimal places, such as .25.
              Minimum Width: .15.

<td>"tableColumns": [

      &nbsp;&nbsp;{

      &nbsp;&nbsp;&nbsp;&nbsp;"heading" : "Finger", //A

      &nbsp;&nbsp;&nbsp;&nbsp;"width" : 0.6

      &nbsp;&nbsp;},

      &nbsp;&nbsp;{

      &nbsp;&nbsp;&nbsp;&nbsp;"heading" : "Yes/No/Not Accessible", //B

      &nbsp;&nbsp;&nbsp;&nbsp;"width" : 0.2

      &nbsp;&nbsp;},

      ]
      
      <td>
        
            Required if section type is table
            Not allowed when section type is serial or repeat

<tr>
      <td>Sticky Table Heading
      <td>Boolean, with set options:
        
          true
          false

<td>
        
          Determines whether the table heading will stay visible when you scroll down the page.
          Can only be used with a section type of table.
          If the parameter is not provided, it is treated as false by default.

<td>"stickyTableHeading": true
      <td>
        
          Optional if section type is table
          Not allowed when section type is serial or repeat

<tr>
      <td>Blocks Array
      <td>None
      <td>The container of all blocks in a section in a survey.
      <td>"blocks": []
      <td>Required

## Universal Part Parameters

All parts in a survey that you configure using JSON have universal parameters, which are described below:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Name
      <td>String
      <td>The part must be assigned a unique name in the survey. The part name may be referenced in schedules and rule configuration, and is not displayed to respondents.
      <td>"name": "part1"
      <td>Required
    
    <tr>
      <td>Display Label
      <td>String
      <td>The display label of the part that is displayed at the top of the survey part for respondents.
      <td>"displayLabel": "Survey: Part 1"
      <td>Required
    
    <tr>
      <td>Part Type
      <td>String, with set options:
        
          ePRO
          eClinRO

<td>
        
          The survey type of this survey part.
          If you do not add a part type, ePRO is selected by default.

<td>"partType": "ePRO"
      <td>
        
          Optional when survey type is composite.
          Not allowed for other survey types.

<tr>
      <td>Respondent
      <td>String, with set options:
        
          participant
        caregiver

<td>
        
          The respondent for this survey part.
          If you do not add a respondent, participant is selected by default.
          Only one part can be configured per respondent.

<td>"respondent": "caregiver"
      <td>
        
          Optional when survey type is composite and part type is ePRO.
          Not allowed when part type is eClinRO.

<tr>
      <td>Sections
      <td>String array, with set options based on configured section names in the related survey.
      <td>
        
          An array of the sections that you want to include in this survey part.
          Each section in the survey must be assigned to exactly one part.

<td>"sections": ["section1", "section2"]
      <td>Required

## Validation Parameters

All validations in a survey that you configure using JSON have universal parameters, which are described below:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Name
      <td>String
      <td>The validation must be assigned a unique name that is only used by the system and is not displayed to respondents.
      <td>"name": "nights_limit"
      <td>Required
    
    <tr>
      <td>Function
      <td>String formula that evaluates to a Boolean
      <td>
        
          The formula used to validate the data using Vault Expression Syntax. The following operators and functions are supported:
            
              Operators: ==, !=, &lt;, &lt;=, &gt;, &gt;=, +, -, &&, ||
              Functions: FindValue

Validations can reference one or more block responses.
          Validations cannot reference Text, Date, Time, Datetime, Number Entry with two answers, Text Entry or Interactive Image (painDetect, freeDraw, jointCount) block types.
          Note: Do not reference block names that have hyphens. The system interprets a hyphen as a minus operation, and cannot interpret the name correctly so you cannot save the validation.

<td>"function": "block.less_sleep.answer + block.no_sleep.answer &lt;= 7"
      <td>Required

## Universal Survey Block Parameters {#universal-survey-block-parameters}

All blocks in a survey that you configure using JSON have universal parameters, which are described below.

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with option of singleChoice
      <td markdown="span">Each block in a survey must have a survey block type. See the Available Block Types section below for more information about each type's unique parameters.
      <td>"type": "singleChoice"
      <td>Required
    
    <tr>
      <td>Block name
      <td>String
      <td>Each block in a survey must be assigned a unique name. It only needs to be unique within the survey; you can reuse block names across surveys

Note: Do not use hyphens in block names if you will reference them in scores functions or cross-question validation functions. The system interprets a hyphen as a minus operation. If referenced in a score, the calculation will be incorrect. If referenced in a validation, the system will not interpret the name correctly and you cannot save the validation.
      <td>"name": "q1"
      <td>Required
    
    <tr>
      <td>Heading image
      <td>Image:
URL string

Description:
String

maxHeightPercentage:
Decimal Number
      <td>
        
          The container for the block heading image URL and image description, if applicable.
          Image: the URL of the heading image uploaded to Studio.
          Description: A description of the heading image that can be read by screen readers for visually-impaired respondents.
            
              Instructions is added by default if no description is provided and the block is a text block.
              Question # is added by default if no description is provided and the block is a question block.
            
          maxHeightPercentage: Defines the percentage of screen height a heading image will fill. If no value is defined, 0.2, meaning 20%, is selected by default.
            
              Increments can be between 20% and 80% and are represented by whole decimal increments between 0.2 and 0.8.

<td>"headingImage": {

          &nbsp;&nbsp;"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyQ1Text.jpg",

          &nbsp;&nbsp;"description": "Pain Survey Question 1 Image",

          &nbsp;&nbsp;"maxHeightPercentage": 0.4

          }
      
      <td>Optional. Not allowed when imageType is painDetect.
    
    <tr>
      <td>Heading text
      <td>String
      <td>
        
          Each block in a survey must have a heading that contains text that the respondent acknowledges or responds to.
          When the block is in a table, the heading will only be displayed for text blocks. All other blocks still require the heading, which is used for reporting.

<td>"heading": "How was your mobility today?"
      <td>Required
    
    <tr>
      <td>Validation Settings
      <td>Validation: String

    Message: String
      
      <td>
          
              The container for the validations related to this question, if applicable.
              Validation: The name of the validation from the Universal Survey Parameters section.
              Message: The error message that is displayed to guide MyVeeva users to enter or select valid information.
              For surveys with multiple parts, a block can only use validations that evaluate blocks in the same survey part.

<td>
    "validationSettings": [

    &nbsp;&nbsp;{

    &nbsp;&nbsp;&nbsp;&nbsp;"validation": "nights_limit",

    &nbsp;&nbsp;&nbsp;&nbsp;"message": "Nights of less sleep and nights of no sleep cannot be more than 7."

    &nbsp;&nbsp;}

    ]
          
          <td>Optional
        
    <tr>
      <td>Question number
      <td>Positive integer
      <td>
        
            Each question block can be given a number that is displayed before the heading in the following format:
                
                    1. Heading here.
                
            If a question block with a number is skipped by a condition, the verbiage Question # not applicable is displayed.
            This parameter can be optionally left blank to not show a number for a block.
              
                If a question block without a number is skipped by a condition, nothing is displayed.

<td>"questionNumber": "1"
      <td>Optional
    
    <tr>
      <td>Optional answers container
      <td>None
      <td>
        
          The container for the survey block's optional answers, if applicable. This is only allowed on question block types.
          Each optional answer is an object in the optionalAnswers container.
          An optionalAnswers container can contain an unlimited number of optional answers.
          This parameter is not supported when the block is in a table section.

<td>"optionalAnswers":

      [{...},{...},...]
      <td>
        
          Required when imageType is jointCount28, jointCount44, jointCount66, or jointCount68
          Not allowed when section type is table
          Not allowed when imageType is painDetect

<tr>
      <td>An optional answer's unique name
      <td>String
      <td>Each optional answer in a survey must be assigned a unique name. It only needs to be unique within the question; you can reuse optional answer names across questions.
      <td>"name": "q1-notapplicable"
      <td>Required for an optional answer
    
    <tr>
      <td>An optional answer's answer text
      <td>String
      <td>The text of the optional answer that is displayed to respondents.
      <td>"answer": "This question is not applicable to me."
      <td>Required for an optional answer
    
    <tr>
      <td>An optional answer's score
      <td>Positive integer
      <td>
        
          The score this question will receive if this answer is selected.
          For more information, see Configuring Scores.

<td>"score": 0
      <td>Optional for an optional answer
    
    <tr>
      <td>Position
      <td>String, in the format of a grid reference
      <td>
        
          The row and column you want the block to be in.
          You position the blocks in the columns and rows using letters to identify the column, and numbers to identify the rows. So the first row is A1, B1, C1, and so on. The second row is A2, B2, C2, and so on.
          This is displayed after the section heading row.
          See the Configuring Tables section on the Configuring Surveys page for more information.
          See Appendix B for a JSON Example that shows a table.

<td>"position" : "A1:B2"
      <td>
        
          Required when section type is table
          Not allowed when section type is serial

<tr>
      <td>Condition
      <td>String
      <td>
        
          If the condition evaluates to true, the block is displayed for the respondent.
          Refers to a condition that is defined in the survey's conditions array. See Configuring Conditions for more details.
          The condition cannot reference a block that is after this block.
          In a table section:
            
              Blocks with conditions will be visible but disabled and empty until the condition is met.
              If all blocks in a row have conditions that are not met, the entire row is hidden.
              For surveys with multiple parts, a block can only use conditions that evaluate blocks in the same survey part.

<td>"condition": "condition1"
      <td>Optional

## Available Block Types {#available-block-types}

Blocks belong to one of two categories: text block or question block types. Text blocks are instructional text for the respondent to acknowledge. Question types require the respondent to provide a response. You can configure the following question types: 

* [Single choice](#configuring-a-single-choice-vrs-question)
* [Multiple choice](#configuring-a-multiple-choice-question)
* [Numeric rating scale](#configuring-a-nrs-question)
* [Visual analog scale](#configuring-vas-scale-question)
* [Number entry](#configuring-number-entry-question)
* [Text entry](#configuring-text-entry-question)
* [Date](#configuring-date-question)
* [Time](#configuring-time-question)
* [Datetime](#configuring-datetime-question)
* [Interactive images](#configuring-interactive-images)
* [Attachment upload](#configuring-attachments)
* [Linked survey](#linkedsurvey)

**Note**:   
- VAS questions are not supported when the block is in a table section. 
- Interactive image questions are not supported when the block is in a table or repeating section.

See below for more information about each block type.

All required parameters must be included in the JSON. Optional parameters can either be included with a value of null, or not included.

### Configuring a Text Block {#configuring-a-text-block}

The following parameters exist for text blocks:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String
      <td>Indicates a block is a text block type.
      <td>"type": "text"
      <td>Required
    
    <tr>
        <td>Heading
        <td>String
        <td>The text that is displayed to a respondent.
        <td>"heading": "This survey will ask you about your pain TODAY. Select OK to continue."
        <td>Required

#### Example Text Block JSON Configuration

The following JSON snippet illustrates the text block parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
  "type": "text",
  "name": "instruction",
  "heading": "This survey will ask you about your pain TODAY. Select OK to continue."
}
~~~

### Configuring a Single-Choice/Verbal Rating Scale (VRS) Question Type {#configuring-a-single-choice-vrs-question}

The following parameters exist for single-choice/verbal rating scale (VRS) question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
        <td>Survey block type
        <td>String, with set option of singleChoice
        <td>Indicates a block is a single-choice/verbal rating scale (VRS) question type.
        <td>"type": "singleChoice"
        <td>Required
    
    <tr>
      <td colspan="5">In the blockSettings parameter:
    
    <tr>
      <td>The height of the block's response options
      <td>String, with set options:
        
          variable
          consistent

<td>
        
          The height of the block's individual response options that are displayed to a respondent
          If no answerHeight is provided, variable is selected by default.

<td>"answerHeight": "variable"
      <td>Optional
    
    <tr>
      <td>The display type of the block's response options
      <td>Boolean, with set options:
        
          true
          false

<td>
        
          Represents whether the block's response options are displayed in a list (false) or in a drop-down menu (true).
          If no boolean is set, false is selected by default.

<td>"displayAsDropdown": true
      <td>Optional
      Cannot be used for questions that include images as answers
    
    <tr>
        <td colspan="5">In the answerSet parameter:
    
    <tr>
        <td>Answers
        <td>None
        <td>
          
            The container of individual response options a respondent can select for a given question.
            Each response option for a given question is an object in the answers container.
            An answers container can contain an unlimited number of optional answers.
            Each response option (answer) includes the parameters below.

<td>"answers": [{...}, {...}, …]
        <td>Required
    
    <tr>
        <td colspan="5">In each answer object:
    
    <tr>
        <td>Name
        <td>String
        <td>
            
                The unique backend name of an answer option.
                Answer names only need to be unique within the question they are configured for; you can reuse answer names across multiple questions in a survey.

<td>"name": "1"
        <td>Required
    
    <tr>
        <td>Answer text
        <td>String
        <td>The text of a response option that is displayed to the respondent.
        <td>"answer": "I have severe pain"
        <td>Optional
Either answer text or an answer image must be provided
    
    <tr>
        <td>Answer's image container
        <td>Image:
URL string

Description:
String
        <td>
          
            The container for the answer image URL and description, if applicable.
            Image: the URL of the answer image uploaded to Studio.
            Description: a description of the answer image that can be read by screen readers for visually-impaired respondents.
              
                Answer [Number] is displayed by default if no description is provided, and the number is the order in which the answer is displayed.

<td>"answerImage": {

          &nbsp;&nbsp;"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",

          &nbsp;&nbsp;"description": "An emotional face showing extreme pain"

          }
        
        <td>Optional
Either answer text or an answer image must be provided
    
    <tr>
        <td>Score
        <td>Whole number
        <td>The score this question will receive if this answer is selected.
        <td>"score": 1
        <td>Optional

#### Example Single-Choice/Verbal Rating Scale (VRS) JSON Configuration

The following JSON snippet illustrates the singleChoice question parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
  "type": "singleChoice",
  "name": "q3",
  "questionNumber": "3",
  "heading": "How is your pain today?",
  "answerSet": {
    "answers": [
      {
        "name": "1",
        "answer": "",
        "score": 0,
        "answerImage": {
	        "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",
	        "description": "An emotional face showing no pain"
	        }
      },
      {
        "name": "2",
        "answer": "",
        "score": 1,
        "answerImage": {
	        "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA2Image.jpg",
	        "description": "An emotional face showing slight pain"
	        }
      },
      {
        "name": "3",
        "answer": "",
        "score": 2,
        "answerImage": {
	        "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA3Image.jpg",
	        "description": "An emotional face showing moderate pain"
	         }
      },
      {
        "name": "4",
        "answer": "",
        "score": 3,
        "answerImage": {
	        "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA4Image.jpg",
	        "description": "An emotional face showing severe pain"
	        }
      },
    ]
  }
}
{
  "type": "singleChoice",
  "name": "q4",
  "questionNumber": "4",
  "heading": "How much physical activity did you perform today?",
  "blockSettings": {
	    "answerHeight": "constant",
	    "displayAsDropdown": true
},
  "answerSet": {
    "answers": [
      {
        "name": "1",
        "answer": "No physical activity",
        "score": 10
      },
      {
        "name": "2",
        "answer": "Light physical activity",
        "score": 20
      },
      {
        "name": "3",
        "answer": "Moderate physical activity",
        "score": 30
      },
      {
        "name": "4",
        "answer": "A large amount of physical activity",
        "score": 40
      },
    ]
  }
}
~~~

### Configuring a Multiple-Choice Question Type {#configuring-a-multiple-choice-question}

The following parameters exist for multiple-choice question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
        <td>The survey block type
        <td>String, with set option of multipleChoice
        <td>Indicates a block is a multiple-choice question type.
        <td>"type": "multipleChoice"
        <td>Required
    
    <tr>
        <td colspan="5">In the "blockSettings" node:
    
    <tr>
      <td>The height of the block's response options
      <td>String, with set options:
        
          variable
          consistent

<td>
        
          The height of the block's individual response options that are displayed to a respondent.
          If no answerHeight is provided, variable is selected by default.

<td>"answerHeight": "variable"
      <td>Optional
    
    <tr>
      <td>The display type of the block's response options
      <td>Boolean, with set options:
        
          true
          false

<td>
        
          Represents whether the block's response options are displayed in a list (false) or in a drop-down menu (true).
          If no boolean is set, false is selected by default.

<td>""displayAsDropdown": true
      <td>Optional
Cannot be used for questions that include images as answers
    
    <tr>
        <td colspan="5">In the answerSet parameter:
    
    <tr>
        <td>Answers
        <td>None
        <td>
          
            The container of individual response options a respondent can select for a given question.
            Each response option for a given question is an object in the answers container.
            An answers container can contain an unlimited number of optional answers.
            Each response option (answer) includes the parameters below.

<td>"answers": [{...}, {...}, …]
        <td>Required
    
    <tr>
        <td colspan="5">In each answer object:
    
    <tr>
        <td>Name
        <td>String
        <td>
            
                The unique backend name of an answer option.
                Answer names only need to be unique within the question they are configured for; you can reuse answer names across multiple questions in a survey.

<td>"name": "1"
        <td>Required
    
    <tr>
        <td>Answer text
        <td>String
        <td>The text of a response option that is displayed to a respondent.
        <td>"answer": "Walking"
        <td>Optional
Either answer text or an answer image must be provided
    
    <tr>
        <td>Answer's image container
        <td>Image:
URL string

Description:
String
        <td>The container for the answer image URL and description, if applicable.
        <td>"answerImage": {

          &nbsp;&nbsp;"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",

          &nbsp;&nbsp;"description": "An emotional face showing extreme pain"

          }
        
        <td>Optional
Either answer text or an answer image must be provided
    
    <tr>
        <td>Score
        <td>Whole number
        <td>The score this question will receive if this answer is selected.
        <td>"score": 1
        <td>Optional

#### Example Multiple-Choice JSON Configuration

The following JSON snippet illustrates the multipleChoice question parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
         "type": "multipleChoice",
         "name": "q1",
         "questionNumber": "1",
         "heading": "Select all the over-the-counter pain medications you took this week.",
         "blockSettings": {
         	"answerHeight": "variable"
            "displayAsDropdown": true
         },
         "answerSet": {
         	"answers": [
                  {
                  	"name": "q1-1",
                    "answer": "Acetaminophen",
         			"score": 8
                  },
                  {
                    "name": "q1-2",
                    "answer": "Naproxen sodium",
         			"score": 8
                  },
                  {
                    "name": "q1-3",
                    "answer": "Aspirin",
         			"score": 5
                  },
                  {
                    "name": "q1-4",
                    "answer": "Ibuprofen",
         			"score": 3
                  }
            ]
      }
},
 
{
       "type": "multipleChoice",
       "name": "q1",
       "questionNumber": "1",
       "heading": "Which physical activities did you perform today?",
       "answerSet": {
       		"answers": [
              	    {
                    	  "name": "q1-1",
                           "answer": "",
         				  "score": 3,
	                      "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",
                            "description": "A person walking"
	    				          }
                    },
                    {
                           "name": "q1-2",
                           "answer": "",
         				  "score": 3,
	                      "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA2Image.jpg",
                            "description": "A person cooking"
	    				          }
                    },
                    {
                           "name": "q1-3",
                           "answer": "",
         				  "score": 3,
	                      "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA3Image.jpg",
                            "description": "A person doing light housekeeping"
	    				          }
                    },
                    {
                           "name": "q1-4",
                           "answer": "",
         				  "score": 3,
	                      "answerImage": {
                            "image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA4Image.jpg",
                            "description": "A person swimming"
	    				          }
                    }
               ]
        }
}
~~~

### Configuring a Numeric Rating Scale (NRS) Question Type {#configuring-a-nrs-question}

**Note**: This question type is not supported when the block is in a table section.

The following parameters apply for numeric rating scale (NRS) question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
        <td>Survey block type
        <td>String, with a set value of numberScale
        <td>Indicates a block is a numeric rating scale (NRS) question type.
        <td>"type": "numberScale"
        <td>Required
    
    <tr>
        <td colspan="5">In the blockSettings parameter:
    
    <tr>
        <td>The scale's minimum value
        <td>Whole number
        <td>The lowest number on the numeric rating scale that a respondent can select.
        <td>"minNumber": 0
        <td>Required
    
    <tr>
        <td>The scale's maximum value
        <td>Whole number
        <td>The highest number on the numeric rating scale that a respondent can select.
        <td>"maxNumber": 10
        <td>Required
    
    <tr>
        <td>The scale's increment
        <td>Number
      <td>
        
          The increment value that responses must be a multiple of.
          Allows positive whole numbers or numbers with one decimal place.
          The difference between the maxNumber and the minNumber values must be divisible by the increment number.
          If no increment is added, it defaults to 1.

<td>"increment": 1
        <td>Optional
    
    <tr>
      <td>Percentages displayed
      <td>Boolean, with set options:
          
            true
            false

<td>
        
          Percentages, including the percent symbol (%), are displayed with the scale positions when this value is set to true.
          If the boolean is not set, false is selected by default and percentages are not displayed.

<td>"showPercent": true
        <td>Optional
    
    <tr>
        <td>Label placement
        <td>String, with set options:
          
            above
            below

<td>
        
          The location of the scale labels.
          If no placement is added, labels are displayed below the scale by default.

<td>"placement": above
        <td>Optional
    
    <tr>
        <td>Scale direction
        <td>String, with set options:
          
            ascending
            descending

<td>
        
          This option determines whether numbers increase or decrease along the scale.
          If no direction is added, ascending is displayed by default.

<td>"direction": ascending
        <td>Optional
    
    <tr>
      <td>The scale's answer image
      <td>Image:
URL string

Description:
String
      <td>
        
          The container for the numeric rating scale's image URL and description, if applicable.
          The image is displayed above the numeric rating scale.
          Image: The URL of the numeric rating scale image uploaded to Studio.
          Description: A description of the numeric rating scale image that can be read by screen readers for visually-impaired respondents.
            
              Number Scale is added by default if no description is provided.

<td>"answerImage": {

        &nbsp;&nbsp;"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyA1Image.jpg",

        &nbsp;&nbsp;"description": "A range of emotional faces with an extremely sad face on the far left and an extremely happy face on the far right"

        }
      
      <td>Optional
    
    <tr>
        <td>The scale's labels
        <td>Positions:
Numbers, in a consecutive order

Label:
String
        <td>
            
                The labels that show beneath the number options on the scale.
                The positions parameter indicates the number on the scale that the label is displayed under. Multiple numbers can be in the positions array, but they must be in a consecutive order.
                Labels can be applied to all, some, or no numbers on the scale.
                    
                        The system will automatically size all labels.
                        You can use an empty string """" as a spacer to make other labels wrap to a smaller width.
                    
                Add manual line breaks to a label by adding &lt;br&gt; where you want the text to wrap.

Note: Using a line break disables automatic text wrapping based on device size, but the font will scale to fit all text as needed based on device size.
                If no customMarks is provided, no labels are displayed below the numeric rating scale.

<td>"customMarks": [
&emsp;{
&emsp;&emsp;"positions":[0],
&emsp;&emsp;"label": "No Pain"
&emsp;},
&emsp;{
&emsp;&emsp;"positions":[10], 
&emsp;&emsp;"label": "Extreme Pain"
&emsp;}
]
        <td>Optional

#### Example Numeric Rating Scale (NRS) JSON Configuration

The following JSON snippet illustrates the numberScale question parameters. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
  "type": "numberScale",
  "name": "q2",
  "questionNumber": "2",
  "heading": "Please select on the scale how much pain you feel today.",
  "blockSettings": {
    "minNumber": 0,
    "maxNumber": 10,
    "increment": 1,
    "answerImage": {
    	"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5678/PainSurveyQ1ScaleImage.jpg",
    	"description": "A range of emotional faces with an extremely happy face on the far left and an extremely sad face on the far right"
    },
    "customMarks": [
      {
        "positions":[0],
        "label": "No Pain"
      },
      {
        "positions":[10],
        "label": "Extreme Pain"
      }
    ]
  }
}
~~~

### Configuring a Visual Analog Scale (VAS) Question Type {#configuring-vas-scale-question}

**Note**: This question type is not supported when the block is in a table section.

The following parameters apply for visual analog scale (VAS) question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with set option of visualScale
      <td>Indicates a block is a visual analog scale (VAS) question.
      <td>"type": "visualScale"
      <td>Required
    
    <tr>
        <td colspan="5">In the blockSettings parameter:
    
    <tr>
        <td>The scale's orientation
        <td>String, with set options:
          
            vertical
            horizontal

<td>Indicates whether you want the scale to be displayed in a horizontal or vertical format.
        <td>"orientation": "vertical"
        <td>Required
    
    <tr>
        <td>The scale's minimum value
        <td>Integer
        <td>
            
                The lowest number on the visual analog scale that a respondent can select.
                The lowest number that can be used is -100.
                The range from the minimum value to the maximum value cannot be more than 100.
                When a negative number is used on the scale, a negative symbol (-) is displayed next to negative numbers and a positive symbol (+) is displayed next to positive numbers.

<td>"minNumber": 0
        <td>Required
    
    <tr>
        <td>The scale's maximum value
        <td>Integer
        <td>
            
                The highest number on the visual analog scale that a respondent can select.
                The highest number that can be used is 100.
                The range from the minimum value to the maximum value cannot be more than 100.
                When a negative number is used on the scale, a negative symbol (-) is displayed next to negative numbers and a positive symbol (+) is displayed next to positive numbers.

<td>"maxNumber": 100
        <td>Required
    
    <tr>
        <td>The scale's increment
        <td>Whole number
      <td>
        
          The increment value that responses must be a multiple of.
          The difference between the maxNumber and the minNumber values must be divisible by the increment number.
          If no increment is added, 1 is selected by default.

<td>"increment": 1
        <td>Optional
    
    <tr>
        <td>The scale's minimum label
        <td>String
        <td>
            
                The label that shows the minimum value of the visual analog scale.
                If a minimum label is not provided, no label is displayed.

<td>"minLabel": "No Pain"
        <td>Optional; Cannot be used with a defined customMarks array
    
    <tr>
        <td>The scale's maximum label
        <td>String
        <td>
            
                The label that shows the maximum value of the visual analog scale.
                If a maximum label is not provided, no label is displayed.

<td>"maxLabel": "The worst pain you can imagine"
        <td>Optional; Cannot be used with a defined customMarks array
    
    <tr>
        <td>The scale's number frequency
        <td>Positive integer
        <td>
            
                How often numbers are displayed along the visual analog scale.
                In the example, the numbers would be displayed along the scale at 0, 10, 20, etc.
                If no integer is provided, only the marks at the minimum and maximum numbers are displayed.
                Must be evenly distributed between the scale range (e.g., must be a divisor of maxNumber minus minNumber.)

<td>"markNumberInterval": 10
        <td>Optional
    
    <tr>
        <td>The scale's mark frequency
        <td>Positive integer
        <td>
            
                How often marks are displayed to the right of the visual analog scale.
                In the example, the marks would be displayed along the scale at 0, 5, 10, etc.
                If no integer is provided, only the marks at the minimum and maximum numbers are displayed.
                Must be evenly distributed between the scale range (e.g., must be a divisor of maxNumber minus minNumber.)

<td>"markDisplayInterval": 5
        <td>Optional
    
    <tr>
        <td>The display option for the respondent's selection
        <td>Boolean, with set options:
          
            true
            false

<td>
            
                Represents whether the numeric value of the respondent's selected position is displayed.
                If the boolean is not set, false is selected by default and no result is displayed.

<td>"displayResult": true
        <td>Optional
    
    <tr>
        <td>The image displayed with the answer
        <td>Image: URL string
Description: String
        <td>
            
                The container for the answer image URL and description, if applicable.
                Image: the URL of the image uploaded to Studio.
                Description: A description of the image that can be read by screen readers for visually-impaired respondents.
                If the scale is horizontal, the image is displayed above the scale.
                If the scale is vertical, the image is displayed to the left of the scale.

<td>"answerImage": {

          &nbsp;&nbsp;"image": "https://patients.myveeva.com/assets/epro/12345-bc12-1234-a1f2-1a2e34fd5695/PainScaleImage.jpg",

          &nbsp;&nbsp;"description": "Pain Scale Faces"

          }
        <td>Optional
    
    <tr>
        <td>The placement of the custom labels
        <td>String, with set options.
For vertical scales:
          
            left
            right

For horizontal scales:
          
            above
            below

<td>
            
                Determines which side of the line or bar the labels will be displayed on.
                For horizontal scales, below is selected by default
                For vertical scales, right is selected by default.

<td>“placement": right
        <td>Optional
    
    <tr>
        <td>Custom marks array
        <td>Positions: A positive or negative whole number or zero that is available on the defined scale

Label: String
        <td>
            
                This array determines specific labels that will be used at specific marks on the scale
                Up to 6 custom marks can be defined
                If custom marks are defined, minLabel and maxLabel cannot be provided.

<td>"customMarks": [

          &nbsp;&nbsp;{

          &nbsp;&nbsp;&nbsp;&nbsp;"positions": 0

          &nbsp;&nbsp;&nbsp;&nbsp;"label": "Lowest mood"

          &nbsp;&nbsp;}

          ]
        <td>Optional; Cannot be used with a defined minLabel or maxLabel
    
    <tr>
        <td>The option to show percentage signs
        <td>Boolean, with set options:
          
            true
            false

<td>
            
                When true, a percentage icon (%) is displayed next to all number labels
                Cannot be used when negative values are used in the scale

<td>"showPercent": true
        <td>Optional
    
    <tr>
        <td>The type of visual used for the scale
        <td>String, with set options:
          
            line
            bar

<td>
            
                Determines whether the scale line is displayed as a wider bar that fills with color as the user interacts, or as a thin line with minimal styling.
                If no value is provided for a vertical scale, bar is displayed by default.
                For a horizontal scale, only line or no value is allowed, and line is displayed by default.

<td>"displayType": "bar"
        <td>Optional

#### Example Visual Analog Scale (VAS) JSON Configuration

The following JSON snippet illustrates the visualScale question parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
  "type": "visualScale",
  "name": "q1",
  "questionNumber": "1",
  "heading": "Please tap on the scale to indicate how your health is TODAY.",
  "blockSettings": {
    "orientation": "vertical",
    "minNumber": 0,
    "maxNumber": 100,
    "minLabel": "The worst health you can imagine",
    "maxLabel": "The best health you can imagine",
    "markDisplayInterval": 10,
    "markNumberInterval": 100,
    "displayResult": false,
    "displayType": "bar"
  }
}
~~~

### Configuring a Number Entry Question Type {#configuring-number-entry-question}

The following parameters apply for number entry question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with a set option of numberEntry
      <td>Indicates a block is a number entry question type.
      <td>"type": "numberEntry"
      <td>Required
    
    <tr>
      <td colspan="5">In the answerSet parameter:
    
    <tr>
      <td>Answers
      <td>None
      <td>
        
          The container of response parameters for the question.
          The answers parameter can contain up to 2 answer objects representing 2 input fields.

<td>"answers": [{...}, {...}]
      <td>Required
    
    <tr>
      <td colspan="5">In each answer object:
    
    <tr>
      <td>Name
      <td>String
      <td>
        
          The unique backend name of an answer option.
          Answer names only need to be unique within the question they are configured for; you can reuse answer names across multiple questions in a survey.

<td>"name": "water"
      <td>Required
    
    <tr>
      <td>Label
      <td>String
      <td>The text label of a number entry field that is displayed to respondents.
      <td>"label": "Cups"
      <td>Required if two answer objects are added
    
    <tr>
      <td>Placeholder
      <td>String
      <td>
        
          The text placeholder in the number entry field that is displayed to respondents.
          The placeholder is replaced by the value the respondent enters in the number entry field.

<td>"placeholder": "Number of Cups"
      <td>Optional
    
    <tr>
      <td>Minimum Number
      <td>Whole number
      <td>
        
          The minimum value that a respondent can enter in the field as a response.
          Only positive numbers are allowed.
          An error is displayed to the respondent if they attempt to enter a value lower than the minNumber value.

<td>"minNumber": 0
      <td>Required
    
    <tr>
      <td>Maximum Number
      <td>Whole number
      <td>
        
          The maximum value that a respondent can enter in the field as a response.
          Only positive numbers are allowed.
          An error is displayed to the respondent if they attempt to enter a value higher than the maxNumber value.

<td>"maxNumber": 20
      <td>Required
    
    <tr>
      <td>Increment
      <td>Number
      <td>
        
          The increment value that responses must be a multiple of.
          If respondents should only be able to enter any whole number, enter an increment value of 1.
          If respondents should be able to enter any number with up to one decimal place, enter an increment value of 0.1.
          You can configure increments of any positive whole number or decimal value.

<td>"increment": 0.5
      <td>Required

#### Example Number Entry JSON Configuration

The following JSON snippet illustrates the numberEntry question parameters described above. The configuration below is not reviewed or licensed for use in a collection.

~~~ json
{
  "type": "numberEntry",
  "name": "q1",
  "heading": "How long did you exercise today?",
  "questionNumber": "1",
  "answerSet": {
    "answers": [
      {
        "name": "hr",
        "label": "Hours",
        "placeholder": "Number of Hours",
        "minNumber": 0,
        "maxNumber": 24,
        "increment": 1
      },
      {
        "name": "min",
        "label": "Minutes",
        "placeholder": "Number of Minutes",
        "minNumber": 0,
        "maxNumber": 59,
        "increment": 1
      }
    ]
  }
}

~~~

### Configuring a Text Entry Question Type {#configuring-text-entry-question}

The following parameters apply for text entry question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with a set option of textEntry
      <td>Indicates a block is a text entry question type.
      <td>"type": "textEntry"
      <td>Required
    
    <tr>
        <td colspan="5">In the blockSettings parameter:
    
    <tr>
      <td>Label
      <td>String
      <td>The text label of a text entry field that is displayed to respondents.
      <td>"label": "Prescribed Medications"
      <td>Optional
    
    <tr>
      <td>Placeholder
      <td>String
      <td>
        
          The text placeholder in the text entry field that is displayed to respondents.
          The placeholder is replaced by the value the respondent enters in the text entry field.

<td>"placeholder": "Enter all medications that are currently prescribed to you. You may exclude over-the-counter medications such as vitamins."
      <td>Optional
    
    <tr>
      <td>The entered text's maximum character length
      <td>Positive integer
      <td>
        
          The maximum number of characters that a respondent can enter as a response.
          The maximum value you can enter is 1,500.

<td>"maxLength": 1000
      <td>Required

#### Example Text Entry JSON Configuration

The following JSON snippet illustrates the textEntry question parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
  "type": "textEntry",
  "heading": "What medications are you currently prescribed?",
  "questionNumber": "1",
  "blockSettings": 
  {
    "label": "Prescribed Medications",
    "placeholder": "Enter all medications that are currently prescribed to you. You may exclude over-the-counter medications such as vitamins.",
    "maxLength": 1000
  }
}
~~~

### Configuring a Date Entry Question Type {#configuring-date-question}

A date entry question asks the respondent to respond by entering a date. To create a date entry question, you must configure a minimum and maximum valid date. You can optionally configure a default date that displays to respondents in the response field. Minimum, maximum, and default date parameters can be static or dynamic values.

Dynamic values are calculated from the point in time at which the respondent is responding to the question. For example, if the maximum date is dynamic with an offset of 3 days, the latest date in the future that a respondent can enter as a response is 3 days after the current date. If the respondent is responding on October 1, 2022, the latest date they can enter as a response is October 4, 2022.

#### Date Entry Question Universal Parameters

The following universal parameters apply for date entry question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with a set option of date
      <td>Indicates a block is a date question type.
      <td>"type": "date"
      <td>Required
    
    <tr>
      <td>Date entry question's blockSettings container
      <td>None
      <td>Contains all minimum, maximum, and default value parameters for the date entry question's configuration.
      <td>"blockSettings":{
&emsp;&emsp;"minValue": {...},
&emsp;&emsp;"maxValue": {...},
&emsp;&emsp;"default": {...}
}
      <td>Required

The following tables describe how to configure the minimum, maximum, and default date parameters for date entry questions. All three parameters described below are contained in the blockSettings container.

#### Date Entry Question Minimum Value Parameters

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Minimum value container
      <td>None
      <td>The container for the date's minimum value parameters that are described below.
      <td>"minValue": {...}
      <td>Required
    
    <tr>
      <td>Minimum value type
      <td>String, with set options:
        
          static
          dynamic

<td>The type of the date's minimum value.
      <td>"type": "static"
      <td>Required
    
    <tr>
      <td>Static minimum value
      <td>String
      <td>
        
          The minimum date value that a respondent can enter as a response.
          You must provide a calendar date in YYYY-MM-DD format.

<td>"value": "2000-01-01"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic minimum value offset container with value and unit
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
        
          days
          weeks
          months
          years

<td>
        
          The time value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
          The first example means the date that is 10 days before the current date.
          The second example means the current date. You can also exclude the parameter to use the current date.

<td>
        
          "offset":{
&emsp;&emsp;"value": -10,
&emsp;&emsp;"unit": "days"
}
          "offset": null

<td>Optional
Only allowed if the type is dynamic

#### Date Entry Question Maximum Value Parameters

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Maximum value container
      <td>None
      <td>The container for the date's maximum value parameters described below.
      <td>"maxValue": {...}
      <td>Required
    
    <tr>
      <td>Maximum value type
      <td>String, with set options:
        
          static
          dynamic

<td>The type of the date's maximum value.
      <td>"type": "static"
      <td>Required
    
    <tr>
      <td>Static maximum value
      <td>String
      <td>
        
          The maximum date value that a respondent can enter as a response.
          You must provide a calendar date in YYYY-MM-DD format.

<td>"value": "2022-12-02"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic maximum value offset container with unit and value
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
        
          days
          weeks
          months
          years

<td>
        
          The time value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
          The first example sets the offset date as 3 months after the current date.
          The second example means the current date. You can also exclude the parameter to use the current date.

<td>
        
          "offset":{
&emsp;&emsp;"value": 3,
&emsp;&emsp;"unit": "months"
}
          "offset": null

<td>Optional
Only allowed if the type is static

#### Date Entry Question default value parameters

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Default response container
      <td>None
      <td>
        
          The container for the parameters of the block's default response that is displayed to a respondent.
          If no default response should be displayed to a respondent, no container is necessary or you can use the value null. If you use null, the default parameters below are irrelevant.

<td>
        
          "default": {...}
          "default": null

<td>Optional
    
    <tr>
      <td>Default response type
      <td>String, with set options:
        
          static
          dynamic

<td>The type of the block's default response that is displayed to a respondent.
      <td>"type": "static"
      <td>Required if the default object exists
    
    <tr>
      <td>Static default response value
      <td>String
      <td>
        
          The value of the block's default response that is displayed to a respondent.
          You must provide a calendar date in YYYY-MM-DD format.

<td>"value": "2022-12-02"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic default response offset container with value and unit
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
        
          days
          weeks
          months
          years

<td>
        
          The time value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
          The first example sets the date as one month before the current date.
          The second example means the current date. You can also exclude the parameter to use the current date.

<td>
        
          "offset":{
&emsp;&emsp;"value": -1,
&emsp;&emsp;"unit": "months"
}
          "offset": null

<td>Optional (only allowed if the type is dynamic)

##### Example Date JSON Configuration

The following JSON snippet illustrates the date entry question parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
          "type": "date",
          "name": "q1",
          "heading": "When was your last injection?",
          "questionNumber": "1",
          "blockSettings": {
            "minValue": {
              "type": "static",
              "value": "2022-01-01"
            },
            "maxValue": {
              "type": "static",
              "value": "2022-12-31"
            },
            "default": null
          }
        },
{
          "type": "date",
          "name": "q2",
          "heading": "When was your last dose of the study drug?",
          "questionNumber": "2",
          "blockSettings": {
            "minValue": {
              "type": "dynamic",
		   "offset": {
                "value": -1,
                "unit": "weeks"
              }
 
            },
            "maxValue": {
              "type": "dynamic",
              "value": "null"
            },
            "default": {
              "type": "dynamic",
              "offset": {
                "value": -1,
                "unit": "days"
              }
 
          }
        },
~~~

### Configuring a Time Entry Question Type {#configuring-time-question}

A time entry question asks the respondent to respond by entering a time. You can optionally configure a minimum and maximum valid time. If you do not configure a minimum or maximum time, 00:00 is the minimum that is displayed by default,and 23:59 is the maximum that is displayed by default, meaning all times are allowed. You can optionally configure a default time that displays to respondents in the response field. Minimum, maximum, and default time parameters can be static or dynamic values.

Dynamic values are calculated from the point in time at which the respondent is responding to the survey. For example, if the minimum time is dynamic with an offset of -30 minutes, the earliest time in the past that a respondent can enter as a response is 30 minutes before the current time. If the respondent is responding at 11:00, the earliest time they can enter is 10:30.

#### Time Entry Question Universal Parameters

The following universal parameters apply for time entry question types:

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String
      <td>Indicates a block is a time question type.
      <td>"type": "time"
      <td>Required
    
    <tr>
      <td>Time entry question's blockSettings container
      <td>None
      <td>Contains all minimum, maximum, and default value parameters for the time entry question's configuration.
      <td>"blockSettings": {
&emsp;&emsp;"minValue": {...},
&emsp;&emsp;"maxValue": {...},
&emsp;&emsp;"default": {...}
}
      <td>Optional

The following tables describe how to configure the minimum, maximum, and default time parameters for time entry questions. All three parameters described below are contained in the blockSettings container described above.

#### Time Entry Question Minimum Value Parameters

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>The time's minimum value container
      <td>None
      <td>
        
          The container for the time's minimum value parameters described below.
          If respondents do not need to be able to select a minimum value, you do not need to include this container or you can use the value null, and you can ignore the minimum value parameters below.

<td>"minValue": {...}
      <td>Optional
    
    <tr>
      <td>Minimum value type
      <td>String, with set options:
        
          static
          dynamic

<td>
        
          The time's minimum value type.
          You can't mix static and dynamic minimum and maximum values.

<td>"type": "dynamic"
      <td>Required if the minValue object exists
    
    <tr>
      <td>Static minimum value
      <td>String
      <td>
        
          The minimum time value that a respondent can enter as a response.
          You must provide a time in 24-hour format.

<td>"value": "00:00"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic minimum value offset container with value and unit
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
        
          minutes
          hours

<td>
        
          The time value that a respondent can enter as a response, in relation to the current time at which the respondent is answering the block.
          The first example sets the offset time as 10 hours before the current time.
          The second example means the current time. You can also exclude the parameter to use the current time.

<td>
        
          "offset":{
&emsp;&emsp;"value": -10,
&emsp;&emsp;"unit": "hours"
}
          "offset": null

<td>Optional
Only allowed if the type is dynamic

#### Time Entry Question Maximum Value Parameters

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Maximum value container
      <td>None
      <td>
        
          The container for the time's maximum value parameters described below.
          If no maximum value that a respondent should be able to select exists, you do not need to include this container or you can use the value null, and you can ignore the maximum value parameters below.

<td>"maxValue": {...}
      <td>Optional
    
    <tr>
      <td>Maximum value type
      <td>String, with set options:
        
          static
          dynamic

<td>
        
          The type of the time's maximum value.
          You can't mix static and dynamic minimum and maximum values.

<td>"type": "static"
      <td>Required if the maxValue object exists
    
    <tr>
      <td>Static maximum value
      <td>String
      <td>
        
          The maximum time value that a respondent can enter as a response.
          You must provide a time in 24-hour format.

<td>"value": "23:59"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic maximum value offset container with value and unit
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:

minutes
          hours

<td>
        
          The maximum time value that a respondent can enter as a response, in relation to the current time at which the respondent is answering the block.
          The first example means the time that is 1 hour after the current time.
          The second example means the current time. You can also exclude the parameter to use the current time.

<td>
        
          "offset":{
&emsp;&emsp;"value": 1,
&emsp;&emsp;"unit": "hours"
}
          "offset": null

<td>Optional
Only allowed if the type is static

#### Time Entry Question default value parameters

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Default response container
      <td>None
      <td>
        
          The container for the parameters of the block's default response that is displayed to a respondent.
          If no default response should be displayed to a respondent, no container is necessary or you can use the value null. If you use null, you can ignore the default value parameters below.

<td>
        
          "default": {...}
          "default": null

<td>Optional
    
    <tr>
      <td>Default response type
      <td>String, with set options:
        
          static
          dynamic

<td>The type of the block's default response that is displayed to a respondent.
      <td>"type": "dynamic"
      <td>Required if the default object exists
    
    <tr>
      <td>Static default response value
      <td>String
      <td>
        
          The value of the block's default response that is displayed to a respondent.
          You must provide a time in 24-hour format.

<td>"value": "12:00"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic default response offset container with value and unit
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
        
          minutes
          hours

<td>
        
          The maximum time value that a respondent can enter as a response, in relation to the current time at which the respondent is answering the block.
          The first example means the time that is 1 hour before the current time.
          The second example means the current time. You can also exclude the parameter to use the current time.

<td>
        
          "offset":{
&emsp;&emsp;"value": -1,
&emsp;&emsp;"unit": "hour"
}
          "offset": null

<td>Optional
Only allowed if the type is dynamic

#### Example Time Entry JSON Configuration

The following JSON snippet illustrates the time entry question parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
        {
          "type": "time",
          "name": "q1",
          "heading": "What time did you wake up today?",
          "questionNumber": "1",
          "blockSettings": {
            "minValue": {
              "type": "static",
              "value": "00:00"
            },
            "maxValue": {
              "type": "static",
              "value": "23:59"
            },
            "default": {
              "type": "static",
              "value": "07:00"
            }
          }
        },
        {
          "type": "time",
          "name": "q2",
          "heading": "What time was your last injection?",
          "questionNumber": "2",
          "blockSettings": {
            "minValue": {
              "type": "dynamic",
              "offset": {
                "value": -24,
                "unit": "hours"
              }
            },
            "maxValue": {
              "type": "dynamic",
              "offset": null
            },
            "default": null
          }
        },
~~~

### Configuring a Datetime Entry Question Type {#configuring-datetime-question}

A datetime entry question asks the respondent to respond by entering a date and time. To configure a datetime entry question, you must configure a minimum and maximum valid datetime. You can optionally configure a default date, time, or datetime that displays to respondents in the response field. Minimum, maximum, and default datetime parameters can be static or dynamic values.

Dynamic values are calculated from the point in time at which the respondent is responding to the survey question. For example, if the minimum datetime is dynamic with an offset of -24 hours, the earliest datetime in the past that a respondent can enter as a response is 24 hours before the current datetime. If the respondent is responding at 11:00 on October 1, 2022, the earliest datetime they can enter is 11:00 on September 30, 2022.

#### Datetime Entry Question Universal Parameters

The following universal parameters apply for datetime entry question types.

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with set option of dateTime
      <td>Indicates a block is a datetime question type.
      <td>"type": "dateTime"
      <td>Required
    
    <tr>
      <td>Datetime entry question's blockSettings container
      <td>None
      <td>Contains all minimum, maximum, and default value parameters for the datetime entry question's configuration.
      <td>"blockSettings": {
&emsp;&emsp;"minValue": {...},
&emsp;&emsp;"maxValue": {...},
&emsp;&emsp;"default": {...}
}
      <td>Required

#### Additional Details

If a date unit is used as the offset unit (days, weeks, months, years), the resulting datetime depends on whether the value is a negative or positive number:

* If the offset value is negative, the resulting datetime is 00:00 on the day that is [value] [units] from the datetime at which the respondent is answering the block.
    * Example: The minimum value is dynamic and -1 week. If the respondent is responding at 07:00 on October 20, 2022, the earliest datetime they can enter as a response is **00:00 on October 13, 2022**.
* If the offset value is positive, the resulting datetime is 23:59 on the day that is [value] [units] from the datetime at which the respondent is answering the block.
    * Example: The maximum value is dynamic and +3 days. If the respondent is responding at 07:00 on October 20, 2022, the latest datetime they can enter as a response is **23:59 on October 23, 2022**.

#### Datetime Entry Question Minimum Parameters

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Minimum value container
      <td>None
      <td>The container for the datetime's minimum value parameters described below.
      <td>"minValue": {...}
      <td>Required
    
    <tr>
      <td>Minimum value type
      <td>String, with set options:
        
          static
          dynamic

<td>The type of the datetime's minimum value.
      <td>"type": "static"
      <td>Required
    
    <tr>
      <td>Static minimum value
      <td>String
      <td>
        
          The minimum datetime value that a respondent can enter as a response.
          You must provide a datetime in YYYY-MM-DDTHH:MM format.

<td>"value": "2000-01-01T00:00"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic minimum value offset container with value and unit
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
        
          minutes
          hours
          days
          weeks
          months
          years

<td>
        
          The minimum datetime value that a respondent can enter as a response, in relation to the current datetime at which the respondent is answering the block.
          The first example means the datetime that is 10 days before the current datetime.
          The second example means the current time. You can also exclude the parameter to use the current time.

<td>
        
          "offset":{
&emsp;&emsp;"value": -10,
&emsp;&emsp;"unit": "days"
}
          "offset": null

<td>Optional
Only allowed if the type is dynamic

#### Datetime Entry Question Maximum Parameters

The following universal parameters apply for datetime entry question types.

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Maximum value container
      <td>None
      <td>The container for the datetime's maximum value parameters described below.
      <td>"maxValue": {...}
      <td>Required
    
    <tr>
      <td>Maximum value type
      <td>String, with set options:
        
          static
          dynamic

<td>The type of the datetime's maximum value.
      <td>"type": "dynamic"
      <td>Required
    
    <tr>
      <td>Static maximum value
      <td>String
      <td>
        
          The maximum datetime value that a respondent can enter as a response.
          You must provide a datetime in YYYY-MM-DDTHH:MM format.

<td>"value": "2022-12-31T23:59"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic maximum value offset container with value and unit
      <td>Value:
Positive or negative integer

Unit:
String, with set options:
        
          minutes
          hours
          days
          weeks
          months
          years

<td>
          The maximum time value that a respondent can enter as a response, in relation to the current datetime at which the respondent is answering the block.
          The first example means the datetime that is 3 months after the current datetime.
          The second example means the current datetime. You can also exclude the parameter to use the current time.
      
      <td>
        
          "offset":{
&emsp;&emsp;"value": 3,
&emsp;&emsp;"unit": "months"
}
          "offset": null

<td>Optional
Only allowed if the type is dynamic

#### Datetime Entry Question Default Parameters

The following universal parameters apply for datetime entry question types.

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Default response container
      <td>None
      <td>
        
          The container for the parameters of the block's default response that is displayed to a respondent.
          If no default response should be displayed to a respondent, no container is necessary or you can use the value null. If you use null, the defaultparameters below are irrelevant.

<td>
        
          "default": {...}
          "default": null

<td>Optional
    
    <tr>
      <td>Default response type
      <td>String, with set options:
        
          static
          dynamic

<td>The type of the block's default response that is displayed to a respondent.
      <td>"type": "static"
      <td>Required if the default object exists
    
    <tr>
      <td>Static default response value
      <td>String
      <td>
        
          The value of the block's default response that is displayed to a respondent.
          You can provide a datetime in YYYY-MM-DDTHH:MM format, a date in YYYY-MM-DD format, or a time in 24-hour format.

<td>"value": "2022-12-31T12:00"
      <td>Required if the type is static
    
    <tr>
      <td>Dynamic default response offset container with value and unit
      <td>Offset: object

Value:
Positive or negative integer

Unit:
String, with set options:
        
          minutes
          hours
          days
          weeks
          months
          years

<td>
        
          The datetime value that a respondent can enter as a response, in relation to the current date at which the respondent is answering the block.
          The first example means the datetime that is one month before the current datetime.
          The second example means the current datetime. You can also exclude the parameter to use the current time.

<td>
        
          "offset":{
&emsp;&emsp;"value": -1,
&emsp;&emsp;"unit": "months"
}
          "offset": null

<td>Optional
Only allowed if the type is dynamic

##### Example Datetime JSON Configuration

The following JSON snippet illustrates the datetime entry question parameters. The configuration below is not reviewed or licensed for use in collections.

~~~ json
        {
          "type": "dateTime",
          "name": "q1",
          "heading": "When did you last eat a meal?",
          "questionNumber": "1",
          "blockSettings": {
            "minValue": {
              "type": "dynamic",
              "offset": {
                "value": -1,
                "unit": "days"
            },
            "maxValue": {
              "type": "dynamic",
              "offset": null
            },
            "default": {
              "type": "dynamic",
              "offset": null
              }
            }
          }
        },
        {
          "type": "dateTime",
          "name": "q2",
          "condition": "condition3",
          "heading": "When did you last visit your primary care physician?",
          "questionNumber": "2",
          "blockSettings": {
            "minValue": {
              "type": "static",
              "value": "2022-01-01T00:00"
            },
            "maxValue": {
              "type": "dynamic",
		    "offset": {
                "unit": 1,
                "value": "months"
              }
            },
            "default": {
              "type": "static",
              "value": "2023-01-01"
          }
        }
~~~

### Configuring an Interactive Image Question Type {#configuring-interactive-images}

Interactive images are specific images that have been configured to allow respondents to interact with an image in response to a question. The parameters in the table below apply for interactive image question types. 

**Note**:   
- This question type is not supported when the block is in a table or repeat section.
- This question type cannot be used in rules. 
- This question type is different than questions that include static images. See the Uploading Images to Surveys section on the Configuring Surveys page for more information.
- This question type is different from questions that allow a site user to upload attachments of images. See the Configuring a Site Media Attachment Question Type section for more information.
- Interactive images can be controlled by a condition, but they cannot control a condition.

<table>
  <thead>
  <tr>
   <td>Parameter
   <td>Data Type
   <td>Description
   <td>JSON Code Example
   <td>Requiredness

<tbody>
  <tr>
   <td>Survey block type
   <td>String, with set option of interactiveImage
   <td>Indicates a block is an interactive image question.
   <td>"type": "interactiveImage"
   <td>Required
  
  <tr>
   <td>Image type
   <td>String, with set options:
       
           freeDraw
           jointCount28
           jointCount44
           jointCount66
           jointCount68
           painDetect

<td>Indicates the type of interactive image

Note: Image types are managed by Veeva, and only specific images are allowed. Contact your Veeva representative for more information.
   <td>"imageType": "painDetect"
   <td>Required
  
  <tr>
   <td colspan="5" >In the blockSettings parameter:
  
  <tr>
   <td>controlsBlock
   <td>String, must reference a block name that is an interactive image block and appears after this block in the survey.
   <td>
       
           Indicates that the current block controls the referenced block.
           The region selected in this block cannot be selected in the referenced block.
           For surveys with more than one part, the referenced block must all be used in the same survey part.

<td>"controlsBlock": "q6"
   <td>Required when used as a conditional block to control available image selections for another interactive image block. Only available when the imageType is painDetect.
  
  <tr>
   <td>controllingBlock
   <td>String, must reference a related block name that is an interactive image block and appears before this block in the survey.
   <td>Indicates that the current block is controlled by the referenced block. The region selected in this block cannot be selected in the referenced block.
   <td>"controllingBlock": "q5"
   <td>Required when image selections are dependent on selections from a different interactive image block. 

Only available when the Type is interactiveImage.
  
    <tr>
   <td>displayCount
   <td>Boolean, with set options:
       
           true
           false

<td>
       
           Indicates whether the number of tender or swollen joints is displayed.
           If this parameter is not added, false is selected by default.

<td>"displayCount": true
   <td>Optional

Only available when the imageType is jointCount28, jointCount44, jointCount66, or jointCount68.
  
  <tr>
   <td>countLabel
   <td>String
   <td>
       
           Adds a translatable label next to the displayCount number.
           HTML elements cannot be included.

<td>"countLabel": "Selected Joints:"
   <td>Optional

Only available when the imageType is jointCount28, jointCount44, jointCount66, or jointCount68.

#### Example Interactive Image JSON Configurations

The following JSON snippets illustrate the interactiveImage question parameters described above. The configurations below are not reviewed or licensed for use in collections.

#### Pain Detect

~~~ json
{
  "name": "q5",
  "type": "interactiveImage",
  "imageType": "painDetect",
  "heading": "Please select your main area of pain.",
  "blockSettings": {
    "controlsBlock": "q6"
  }
}
{
  "name": "q6",
  "type": "interactiveImage",
  "imageType": "painDetect",
  "heading": "Please select the direction in white the pain radiates.",
  "blockSettings": {
    "controllingBlock": "q5"
  }
}
~~~

#### Joint Count 68

~~~ json
{
  "name": "q7",
  "type": "interactiveImage",
  "imageType": "jointCount68",
  "heading": "Please select your main area of pain.",
  "blockSettings": {
    "displayCount": true,
    "countLabel": "Selected Joints:"
  }
}
~~~

#### Free Draw

~~~ json
{
  "name": "q8",
  "type": "interactiveImage",
  "imageType": "freeDraw",
  "heading": "Please draw the room you are in."
  }
}
~~~

### Configuring an Attachment Upload Question Type {#configuring-attachments}

Attachment upload questions (siteMedia) enable site users to upload a PNG or JPG image or a PDF file as a response. The file must be 10 MB or less. When included on a survey, this question type is displayed with a reminder to not include identifying information in the file.  

**Note**:   
- This question type is only allowed when the survey type is eClinRO or composite.
- This question type cannot be used in summary blocks, scores, conditions, cross validations, or rule expressions. 
- This question type is different from static images that are displayed in a survey. See the Uploading Images to Surveys section on the Configuring Surveys page for more information.
- This question type is different from interactive image questions that allow you to draw or interact with an image in the survey. See the [Configuring an Interactive Image Question Type](#configuring-interactive-images) section for more information.

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with set option of siteMedia
      <td>Indicates a block is an attachment upload type.
      <td>"type": "siteMedia"
      <td>Required

### Configuring a Linked Survey Question Type {#linkedsurvey}

Linked surveys questions can be configured to allow respondents to select responses they provided in other surveys to respond to a question. The parameters in the table below apply for linked survey question types.

**Note**:   
- This question type is not supported when the block is in a repeat section.
- This question type cannot be used in scores or rules. 
- Linked survey questions can be controlled by a condition, but they cannot control a condition.

<table>
  <thead>
    <tr>
      <th>Parameter
      <th>Data Type
      <th>Description
      <th>JSON Code Example
      <th>Requiredness

<tbody>
    <tr>
      <td>Survey block type
      <td>String, with set option of link
      <td>Indicates a block is supposed to populate answer options from responses the user already submitted in a linked survey.
      <td>"type": "link"
      <td>Required
    
    <tr>
      <td colspan="5">
        In the "blockSettings" parameter:

<tr>
      <td>Related Survey
      <td>String, with set options based on configured survey names.
      <td>
        
          The name of the survey that you want to pull answers from.
          You can use the survey you are currently in as a related survey.
          You cannot use a training survey or a survey with parts as the related survey
          If no optional parameter information is added, the survey label and completed at datetime are displayed in the list.

<td>"relatedSurvey": "feeding_survey"
      <td>Required
    
    <tr>
      <td>Summary Block
      <td>String array, with set options based on configured question names in the related survey.
      <td>
        
          The block name from the related survey that you want to display submitted responses for in the answer list.
          You can only add one item in the array.
          You cannot use blocks in any of these categories:
            
              Conditionally controlled blocks
              Blocks in repeat sections
              Interactive image question blocks
              Link question blocks
              Text entry blocks

ePRO surveys can only reference summary blocks in other ePRO surveys, and eClinRO surveys can only reference summary blocks in other eClinRO surveys.
          If you use the survey you’re currently in as a related survey, you need to include optional answers, because the summary block will not have answers available the first time the survey is submitted.

<td>"summaryBlocks": ["food"]
      <td>Optional
    
    <tr>
      <td>Label
      <td>String
      <td>The label is shown above the response and on top of the answer selection list.
      <td>"label": "Feeding Surveys"
      <td>Optional
    
    <tr>
      <td>Placeholder
      <td>String
      <td>If the user has not yet answered the question, this text is displayed in the list.
      <td>"placeholder": "No answers available from submitted survey"
      <td>Optional
    
    <tr>
      <td>Empty State
      <td>String
      <td>When the user has not submitted a related survey yet, this text is displayed instead of a list.
      <td>"emptyState": "No submissions"
      <td>Optional
    
    <tr>
      <td>List Range
      <td>Whole number
      <td>
        
          The number of days from the current date that the responses from the related surveys are pulled in for.
            
              For example, if you enter 1, only survey responses from the current day and previous day are displayed in the list. If you enter 0, only surveys from the current day are displayed.

If you do not add a list range, all related responses are displayed in the list.

<td>"listRange:" 1
      <td>Optional

#### Example Single-Choice/Verbal Rating Scale (VRS) JSON Configuration
The following JSON snippet illustrates the singleChoice question parameters described above. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
  "type": "link",
  "name": "vomiting_feeding_cause",
  "condition": null,
  "heading": "Select the feeding that this vomiting occurred after.",
  "questionNumber": "null",
   "optionalAnswers": [
      {
        "name": "optional1",
        "answer": "I don’t know",
      },
      {
        "name": "optional2",
        "answer": "Not applicable",
      },
  "blockSettings": {
	    "relatedSurvey": "feeding_survey",
	    "summaryBlocks": [
            “q2”
          ],
     "label": "Choose one.",
     "placeholder": "Feeding surveys",
     "emptyState": "No submissions available.",
     "listRange": 1 
  },
 ]
}
~~~

## Appendix A {#appendixa}

### Example Diary JSON Configuration
The following JSON snippet illustrates a diary configuration. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
 "label": "Medication Diary",
 "surveySubtype": "diary",
 "reviewPrompt": "true",
 "diarySettings": {
   "diaryLabel": "Medication Diary",
   "actionLabel": "Complete this if you take a medication",
   "description": "Consider the medications you take when answering these diary questions. You’ll have one daily diary and you can add a backup if you miss one or need to include more medications.",
   "showResponses": true,
   "summaryBlocks": ["1"],
   "addNewDescription": ["Log a backup diary"]
 },
 "sections": [
   {
     "name": "section1",
     "blocks": [
       {
         "name": "1",
         "type": "time",
         "heading": "Enter the time that you took the medication."
        }
      ]
    }
  ]
}
~~~

## Appendix B {#appendixb}

### Example Single-Choice/Verbal Rating Scale (VRS) in a Table JSON Configuration

The following JSON snippet illustrates the singleChoice question parameters within the context of a table section. The configuration below is not reviewed or licensed for use in collections.

~~~ json
{
 "surveyType": "eClinRO",
 "name": "Fingers / Toes",
 "description": "Fingers and Toes Survey",
 "reviewPrompt": "false",
 "sections": [
   {
       "name": "finger",
       "type" : "table",
       "condition": null,
       "heading" : "Finger",
       "stickyHeading" : false,
       "stickyTableHeading" : false,
       "tableColumns": [
           {
               "heading" : "Finger", //A
               "width" : 0.6
           },
           {
               "heading" : "Yes/No/Not Accessible", //B
               "width" : 0.2
           },
           {
               "heading" : "Circumference involved digit (mm)", //C
               "width" : 0.2
           },
           {
             "heading" : "Is contralateral assessable?", //D
             "width" : 0.6
         },
         {
             "heading" : "Circumference contraleral Digit? (mm)", //E
             "width" : 0.2
         },
         {
             "heading" : "Tenderness", //F
             "width" : 0.2
         }
       ],
       "blocks" : [
           // ROW 1
           {
               "type": "text",
               "name": "Right1Finger",
               "position" : "A1",
               "condition": null,
               "heading": "Right 1st finger (thumb)"
           },
           {
               "type": "singleChoice",
               "name": "Right1FingerYN",
               "position" : "B1",
               "condition": null,
               "heading": "Right 1st Finger - Yes/No/NotAccessible",
               "questionNumber": "1a",
               "answerSet": {
                   "answers": [
                   {
                       "answer": "Yes",
                       "name": "1"
                   },
                   {
                       "answer": "No",
                       "name": "2"
                   },
                   {
                       "answer": "Not Accessible",
                       "name": "3"
                   }
                   ]
               },
               "blockSettings": null
           },
           {
               "type": "numberEntry",
               "name": "Right1FingerCID",
               "position" : "C1",
               "condition": null,
               "heading": "Right 1st Finger - Circumference involved digit",
               "questionNumber": "1b",
               "answerSet": {
                 "answers": [
                   {
                     "name": "1",
                     "label": "mm",
                     "placeholder": "mm",
                     "minNumber": 0,
                     "maxNumber": 100,
                     "increment": 1
                   }
                 ]
               }
             },
             {
               "type": "singleChoice",
               "name": "Right1FingerICAYN",
               "position" : "D1",
               "condition": null,
               "heading": "Right 1st Finger - Is contralateral accessible?",
               "questionNumber": "1c",
               "answerSet": {
                   "answers": [
                   {
                       "answer": "Yes",
                       "name": "1"
                   },
                   {
                       "answer": "No",
                       "name": "2"
                   }
                   ]
               },
               "blockSettings": null
           },
           {
               "type": "numberEntry",
               "name": "Right1FingerCCD",
               "position" : "E1",
               "condition": null,
               "heading": "Right 1st Finger - Circumference contralateral digit",
               "questionNumber": "1d",
               "answerSet": {
                 "answers": [
                   {
                     "name": "1",
                     "label": "mm",
                     "placeholder": "mm",
                     "minNumber": 0,
                     "maxNumber": 100,
                     "increment": 1
                   }
                 ]
               }
             },
             {
               "type": "singleChoice",
               "name": "Right1FingerTYN",
               "position" : "F1",
               "condition": null,
               "heading": "Right 1st Finger - Tenderness",
               "questionNumber": "1e",
               "answerSet": {
                   "answers": [
                   {
                       "answer": "Yes",
                       "name": "1"
                   },
                   {
                       "answer": "No",
                       "name": "2"
                   }
                   ]
               },
               "blockSettings": null
           },
           //ROW 2
           {
               "type": "text",
               "name": "Right2Finger",
               "position" : "A2",
               "condition": null,
               "heading": "Right 2nd finger (index)"
           },
           {
               "type": "singleChoice",
               "name": "Right2FingerYN",
               "position" : "B2",
               "condition": null,
               "heading": "Right 2nd Finger - Yes/No/NotAccessible",
               "questionNumber": "2a",
               "answerSet": {
                   "answers": [
                   {
                       "answer": "Yes",
                       "name": "1"
                   },
                   {
                       "answer": "No",
                       "name": "2"
                   },
                   {
                       "answer": "Not Accessible",
                       "name": "3"
                   }
                   ]
               },
               "blockSettings": null
           },
           {
               "type": "numberEntry",
               "name": "Right2FingerCID",
               "position" : "C2",
               "condition": null,
               "heading": "Right 2nd Finger - Circumference involved digit",
               "questionNumber": "2b",
               "answerSet": {
                 "answers": [
                   {
                     "name": "1",
                     "label": "mm",
                     "placeholder": "mm",
                     "minNumber": 0,
                     "maxNumber": 100,
                     "increment": 1
                   }
                 ]
               }
             },
             {
               "type": "singleChoice",
               "name": "Right2FingerICAYN",
               "position" : "D2",
               "condition": null,
               "heading": "Right 2nd Finger - Is contralateral accessible?",
               "questionNumber": "2c",
               "answerSet": {
                   "answers": [
                   {
                       "answer": "Yes",
                       "name": "1"
                   },
                   {
                       "answer": "No",
                       "name": "2"
                   }
                   ]
               },
               "blockSettings": null
           },
           {
               "type": "numberEntry",
               "name": "Right2FingerCCD",
               "position" : "E2",
               "condition": null,
               "heading": "Right 2nd Finger - Circumference contralateral digit",
               "questionNumber": "2d",
               "answerSet": {
                 "answers": [
                   {
                     "name": "1",
                     "label": "mm",
                     "placeholder": "mm",
                     "minNumber": 0,
                     "maxNumber": 100,
                     "increment": 1
                   }
                 ]
               }
             },
             {
               "type": "singleChoice",
               "name": "Right2FingerTYN",
               "position" : "F2",
               "condition": null,
               "heading": "Right 2nd Finger - Tenderness",
               "questionNumber": "2e",
               "answerSet": {
                   "answers": [
                   {
                       "answer": "Yes",
                       "name": "1"
                   },
                   {
                       "answer": "No",
                       "name": "2"
                   }
                   ]
               },
               "blockSettings": null
           }
//ROW 3
// ...
       ]
   }
 ],
 "conditions": [],
 "scores": []
}
~~~