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.
- Navigate to the
Codetab in Visiontree Studio. - Locate the section in the JSON or CSV where you want to add a new field.
- 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.
- In the
Codetab, locate the field you want to delete. - Highlight the entire field, including its curly braces
{}or square brackets[], and pressDeleteorBackspaceon your keyboard.
Modifying a Field
Change the properties, options, or values of a field to tailor the form to your needs.
- Locate the field you want to modify in the
Codetab. - 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: