Skip to content
TheChatArchiveThe Chat Archive
o3-mini· OpenAIHugging Face LMArena Human Preference 140K

how to make a check box in kobo that when selected will render an input field

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Coherecommand-a-03-2025’s answer.
  1. User

    how to make a check box in kobo that when selected will render an input field

  2. Assistant

    You can achieve this behavior in KoboToolbox by using relevance logic. Essentially, you create a checkbox (or multiple‑choice) question, then add an input field (for example, a text question) whose appearance is controlled by a condition that checks whether that checkbox was selected.

    Below are the steps using an XLSForm (Excel) as an example:


    1. Create the Checkbox Question

    Assume you have a question where the respondent can check an option. For instance, let’s name it reason_check and let the only choice be other. In your survey sheet, it might look like:

    typenamelabel
    select_multiple yesnoreason_checkDo you have another reason?

    And in your choices sheet, you define:

    list_namenamelabel
    yesnoyesYes
    yesnonoNo
    yesnootherOther

    Note: If you only want a single option to trigger the input field, you might be considering using a select_one question with choices like “Yes” and “No” instead.


    2. Create the Input Field That Appears Conditionally

    Next, add a question for additional input. For example, an "Other Reason" text field that should appear only when the respondent selects the other option. In your survey sheet, add:

    typenamelabelrelevant
    textother_reasonPlease specify your reason:selected(${reason_check}, 'other')

    Here, the key is the relevant column. The expression

    selected(${reason_check}, 'other')
    

    means that the other_reason field will only be displayed if the respondent selected the other option within the reason_check question.


    3. How It Works

    • When the Condition Is Met:
      If the respondent selects “Other” (i.e., the other value) in the reason_check question, the relevance logic (selected(${reason_check}, 'other')) evaluates to true, and the other_reason text field is displayed.

    • When the Condition Is Not Met:
      If “Other” is not selected, the text input field (other_reason) remains hidden.


    4. Notes When Using the KoboToolbox Form Builder

    If you’re using the KoboToolbox Form Builder (web interface):

    1. Add the Checkbox Question:

      • Drag and drop a question type that fits your need (e.g., "Select one" or "Select multiple").
      • Configure its options.
    2. Add the Input Field:

      • Create a new field (e.g., text input).
    3. Set Up the Relevance:

      • In the input field’s settings, find the “Relevance” or “Condition” setting.
      • Enter an expression similar to:
        selected(${reason_check}, 'other')
        
      • This tells KoboToolbox to show the field only when the respondent has selected “Other” in the checkbox question.
    4. Test Your Form:

      • Use the preview function in KoboToolbox to ensure the input field appears only under the desired condition.

    With these steps, you’ll have a KoboToolbox form where selecting a checkbox option dynamically renders or hides an associated input field.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.