Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updates checkbox

...

Code Block
languagejsx
{
  "label":"Is the client experiencing any of the following TB symptoms?",
  "type":"obs",
  "questionOptions":{
    "rendering":"checkbox",
    "concept":"159800AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
    "answers":[
      {
        "concept":"1494AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "label":"Fever lasting more than 3 weeks"
      },
      {
        "concept":"159799AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "label":"Cough lasting more than 2 weeks"
      },
      {
        "concept":"138905AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "label":"Hemoptysis"
      },
      {
        "concept":"133027AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "label":"Night sweats"
      }
    ]
  },
  "id":"tbSymptoms"
}

Renders:

...

You also have an option to display all the answers inline that will render all answers for easier selection by including the "inlineMultiCheckbox": true at the question level

Code Block
{
  "label":"Inline MultiCheckbox Question",
  "type":"obs",
  "inlineMultiCheckbox": true,
  "questionOptions":{
    "rendering":"checkbox",
    "concept":"159800AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
    "answers":[...]
  },
  "id":"multicheckboxQn"
}

Demo:

...

textarea

Renders a textarea input. By default, the textarea will be 4 rows tall. You can configure the number of visible text lines for the input by providing a number to the rows property in your questionOptions definition.

...

Think of this as a hidden HTML input. In some cases, a form needs to a persist a predefined non-mutable value on submission.

...