Looping

Looping

Feature Overview

Looping allows a set of questions (section questions) to automatically repeat based on the answers selected in a Base question. It helps survey creators collect feedback for multiple items without manually duplicating the same questions.

Idea
This feature is commonly used in surveys where respondents may interact with multiple products, brands, or services.
For example, in a product research survey, a respondent may select multiple brands they have used. Using looping, the survey can automatically repeat the same feedback questions for each selected brand. This helps researchers collect brand-specific insights in a structured way.

How Looping Works

Looping works by repeating section's questions based on the options selected in a Base question.

Base Question 

A base question is the question whose selected options control the looping behavior.
Supported Base Question Types
  • Multiple Choice Question
  • Number Question
  • Video/image choice Question 

Steps 

  1. Create the Base question asking respondents 
  2.  Add a new section below this question 
  3. Hover over the section and open the Logic settings from the bottom-right corner.
  4.  The system displays two configuration options: Display Logic and Looping. Select Looping option
  5. Choose Base question for looping.
  6. You can Add New field , Apply Randomization & Apply Limit on loop
  7.  After apply all the require changes then Save & Exit    

Example

Base Question:

Which products have you used?

  • Option A

  • Option B

  • Option C

If a respondent selects Option A and Option C, the survey will create two loops on entire section  & each loop will contain the same question of section on which loop is applied.

Loop 1 → Option A
Loop 2 → Option C

Personalize Questions Using Pipe Text :- You can also use pipe text to dynamically insert the selected option into the follow-up section's questions. This ensures that each repeated question clearly refers to the specific item being evaluated.

Looping Based on Multiple Choice (MCQ) 

When the Base Question Type is a Multiple Choice Question, looping can repeat a section based on the options related to that question.

Steps 

  1. Create the MCQ as Base question asking respondents. 
  2.  Add a new section below this question 
  3. Hover over the section and open the Logic settings from the bottom-right corner.
  4.  The system displays two configuration options: Display Logic and Looping. Select Looping option
  5. Choose Base question for looping.
  6. You can Add New field , Apply Randomization & Apply Limit on loop
  7.  After apply all the require changes then Save & Exit    

Base Question is Multiple Choice Question

Loop Based On Options

  1. Selected Choices by Respondent :- In this option, the loop runs only for the choices selected by the respondent in the base question.
  2. Unselected Choices by Respondent :- In this option, the loop runs for the options not selected by the respondent
  3. All Choices :- In this option, the loop runs for all options of the base question, regardless of the respondent's selection.

Field Mapping in MCQ

Field Mapping helps the system identify which option is being used in each loop.

When looping is based on a Multiple Choice base question, every selected/unselected/All option becomes one loop. Field Mapping stores that option so it can be used inside the questions in the looping section.

InfoBy default, the system creates Field 1, which contains the selected/unselected/All option.
Adding Additional Fields :- The + Add Field option allows survey creators to add more fields for each loop iteration if additional data needs to be associated with the loop. 
Each additional field can store:
      • Text values — custom text labels for each loop iteration.

      • Media values — additional images or videos associated with each loop iteration. you can add image and video in different field choice

    Base Question:
    Which cars do you own?
    Options:
    • A
    • B
    • C
    Field Mapping could be:
    LoopField 1 (Car Brand)Field 2 (Car Category)
    Loop 1ASUV
    Loop 2BSedan

    Randomize Loop Order

    This option randomizes the order in which loop iterations appear in the survey. Randomizing loop order helps reduce order bias in research surveys.

    Limit to Loops

    This option restricts the maximum number of loop iterations, even if more options qualify for looping.
    Example
    If 5 options qualify for looping but the limit is set to 3, only 3 loops will be shown in the survey.

    Notes
    This helps prevent the survey from becoming too long when respondents select many options.

    Looping Based on Number Question 

    Looping can also be created using a Number type base question. In this case,  Instead of looping through selected options, the survey loops the section as many times as the numeric value provided by the respondent in Number question.

    Step

    1. Add a Numeric question that will act as the Base Question for looping.
    2. Create a section containing the follow-up questions.
    3. Hover over the section and open Logic settings.
    4. Select Looping as the logic type.
    5. Choose the numeric question as the Base question.
    6. Select the Max Loop Count 
      Notes
      This helps prevent the survey from becoming too long when respondents provided large number.
    7. You can Add New field  & Apply Randomization.
    8. After apply all the require changes then Save & Exit.
     

    Loop Based On Max count 

    The Max Loop Count setting limits the number of loops that can be created. 
    Warning
    The actual number of loops will be the smaller( Respondent's input , Max count )
    Example
    If Max Loop Count = 4

    Respondent InputLoops Created
    22
    44
    64

    Field Mapping 

    In number-based looping, field mapping represents the loop index number.
    If Max Loop Count = 4


    Loop


    Field 1
    Loop 11
    Loop 22
    Loop 33
    Loop 44

    Adding Additional Fields :- The + Add Field option allows survey creators to add more fields for each loop iteration if additional data needs to be associated with the loop.
    Each additional field can store:
        • Text values — custom text labels for each loop iteration.

        • Media values — additional images or videos associated with each loop iteration. you can add image and video in different field choice

      Base Question:
      How many cars do you own?
      Answer: 2
      Field Mapping could be:
      LoopField 1 (Car Brand)Field 2 (Car Category)
      Loop 11SUV
      Loop 22Sedan

      Randomize Loop Order

      This option randomizes the order in which loop iterations appear in the survey. Randomizing loop order helps reduce order bias in research surveys

      Looping Based on Image/Video Choice Question

      When the Base Question Type is a Image/video Choice Question, looping can repeat a section based on the choice related to that question. This enables researchers to collect detailed feedback for each media option — such as advertisements, product visuals, or video clips — without manually duplicating questions.


      How to Access Looping for an Image/Video Choice Question

      1. Create an Image/Video Choice question as your Base question, with media options added to each choice.

      2. Add a new section below this question.

      3. Hover over the section and open Logic settings from the bottom-right corner.

      4. The system displays Display Logic and Looping. Select Looping.

      5. In the looping configuration screen, select the Image/Video Choice question as the base question from the Select question dropdown (displaying the question ID and question text).

      6. Configure the remaining looping settings as described below.

      7. Click Save & Exit when done.

      Loop Based On Options

      1. Selected Choices by Respondent :- In this option, the loop runs only for the choices selected by the respondent in the base question.
      2. Unselected Choices by Respondent :- In this option, the loop runs for the choice not selected by the respondent
      3. All Choices :- In this option, the loop runs for all media options of the base question, regardless of the respondent's selection.

      Field Mapping Section

      Field Mapping shows how each option of the base Image/Video question is mapped to loop iterations.

      • Field 1 (Default Loop Field): Automatically created. It represents the primary loop variable derived from the base question choices. Each option of the base question appears as a separate loop iteration entry under this field.

      • (+) Add Field Button: This button allows users to create additional custom fields for each loop iteration. For Image/Video Choice, each additional field can store:

            • Text values — custom text labels for each loop iteration.

            • Media values — additional images or videos associated with each loop iteration. you can add image and video in different field choice


        Info
        These extra fields can be used in pipe text inside looped questions to personalise the experience for each respondent

        Pipe Text Behaviour 

        Use the Pipe Text inside the section questions to dynamically display the product or option name for each loop iteration.
        To insert it:
        1. Click on the Pipe Text icon in the question editor.
        2. Select Looping from the available options.
        3. Choose the base question whose options are being used for looping.
        The selected loop value will then automatically appear inside the question for each iteration.

        Alert
        The Looping option in Pipe Text is only visible when looping has already been applied to that section.

        Notes
        if an option does not have a defined choice name, the system automatically assigns a default label such as Choice 1, Choice 2, etc. These default labels appear in the pipe text output during loop execution.



        Notes
        Note: Delete/Edit your Looping logic by clicking on the edit and delete icon visible on your section's build.

        Pipe Texted Question setting ( Image/video Question)

        Additional settings become available in the Question Settings panel when the selected pipe text field contains media (images or videos). These settings are independent of the base question type.


        1. Pipe Image/Video Position : Defines where the piped media appears relative to the question text:
          • Above Question: Displays the piped image or video above the question text.

          • Below Question: Displays the piped image or video below the question text.

        2. Image/Video Sequence : Determines how multiple media options are arranged visually:
          • Grid view: Displays options side-by-side in rows.

          • Stack view: Displays options vertically, one below another.

        3. Image/Video Size (Choice Level) : Controls the size of media displayed for each answer option within the looped question:

        4. Require Full Video Watch Before Continuing : When enabled for a pipe-texted question containing video:

          • Respondents must watch the complete video before they can proceed to the next question or submit a response.

          • The system restricts skipping or answering until video playback is fully completed.

          • Important: This setting only applies when the piped media contains a video file. If the media contains only images, this setting is disabled.


          • Related Articles

          • Logic

            Logic in Surveys Overview Logic helps make surveys smarter and more efficient by showing respondents only the questions that are relevant to them. Instead of displaying every question to every respondent, logic allows the survey to adapt dynamically ...
          • Image/Video Choice Question

            Overview The Image/Video Choice question type in SurveySensum allows survey creators to present answer options using images or videos instead of only text, making surveys more visual and engaging for respondents. Respondents select their preferred ...