Skip to content
On this page

Code Editing in Visiontree Studio

Visiontree Studio provides a powerful code editor allowing you to create or modify your forms using JSON or CSV format. The auto-renderer feature displays the real-time changes on a mini display as you edit the code. This section will guide you through adding, deleting, and modifying fields in your form.

Adding New Fields

Add new fields to your form using the standards set by FHIR for JSON forms and questionnaires.

  1. Navigate to the Code tab in Visiontree Studio.
  2. Locate the section in the JSON or CSV where you want to add a new field.
  3. Use the FHIR structure to add a new field, for instance:
    json
    {
      "resourceType": "Questionnaire",
      "item": [
        {
          "linkId": "1",
          "text": "New Question?",
          "type": "string"
        }
      ]
    }

Deleting a Field

Remove questions, options, or any other fields that are no longer needed.

  1. In the Code tab, locate the field you want to delete.
  2. Highlight the entire field, including its curly braces {} or square brackets [], and press Delete or Backspace on your keyboard.

Modifying a Field

Change the properties, options, or values of a field to tailor the form to your needs.

  1. Locate the field you want to modify in the Code tab.
  2. Alter the values, add or remove options, or change the field properties as needed. For example:
    json
    {
      "linkId": "1",
      "text": "Modified Question?",
      "type": "choice",
      "answerOption": [
        {
          "valueString": "Option 1"
        },
        {
          "valueString": "Option 2"
        }
      ]
    }

Additional Resources and Information

For a deeper understanding of form creation and the meaning of various keywords/values, refer to: