Template - JSON
How to Use JSON as a Template
JSON documents can be generated from a JSON Schema, where SmartIQ will parse the schema and present placeholders corresponding to the available schema elements.
To prepare your .json template for SmartIQ using Notepad:
- Use Notepad to create and save the .json file.
- In Design, open your project and add a template to the Finish page.
- Browse to the .json file and click OK.
- The placeholders will now load from the placeholder tab of your template. You will be able to map these to your questions.
- Upon completion of your SmartIQ Form, a JSON file will be produced.
Inserting Multiple Choice Answer Values into a JSON Array
It is possible to populate a JSON array from the answer values of a non-repeated Multiple Choice question. When a JSON array's
.text() placeholder is mapped to Multiple Choice answers, the selected answer values are inserted into the array. An example of the setup in Design is shown below:
This allows for values to be inserted directly, without needing to map the question's answers through a repeating section to drive the array insert.
The placeholder's Behaviour must be set to "Insert Answer Value" or "Insert Display Text" to have an effect.
Updated 3 months ago