Sample Survey
A complete, working survey schema you can use as a starting point.
Minimal Template
The smallest valid survey with one text field and one choice field, plus a conditional linking them.
json
{
"project_title": "New Project",
"survey_id": "10001",
"geometry_type": "point",
"version": "1.0.0",
"locale": {
"default": "en_US",
"supported": ["en_US"]
},
"fields": [
{
"question": "Example Text Question?",
"display_type": "text_field",
"data_type": "text",
"key": "example_text",
"required": true,
"entry_title": true,
"hint": "Type here",
"placeholder": "Text..."
},
{
"question": "Example Choice?",
"display_type": "drop_down",
"data_type": "text",
"key": "example_choice",
"required": true,
"default_value": ["OPTION_A"],
"choices": ["OPTION_A", "OPTION_B"],
"entry_title": false
}
],
"conditionals": {
"1": "example_choice == 'OPTION_B' >> example_text"
}
}The conditional here means: show example_text only when example_choice is 'OPTION_B'.
Full Example
A comprehensive demographic and property survey demonstrating all field types and conditional patterns.
json
{
"project_title": "Data Collection Survey",
"survey_id": "30232",
"geometry_type": "point",
"version": "1.0.0",
"description": "A comprehensive survey for collecting demographic and property data",
"locale": {
"default": "en_US",
"supported": ["en_US", "es_ES", "fr_FR"]
},
"fields": [
{
"question": "What is your full name?",
"display_type": "text_field",
"data_type": "text",
"key": "full_name",
"entry_title": true,
"min_length": 1,
"max_length": 100,
"required": true,
"hint": "Enter your full name",
"placeholder": "Enter your full name",
"regex": "^[A-Za-z\\s\\-']+$"
},
{
"question": "What is your gender?",
"display_type": "drop_down",
"data_type": "text",
"key": "gender",
"required": true,
"hint": "Select your gender",
"placeholder": "Select gender",
"default_value": ["MALE"],
"choices": ["MALE", "FEMALE", "PREFER NOT TO SAY"],
"entry_title": false,
"regex": "^(MALE|FEMALE|PREFER NOT TO SAY)$"
},
{
"question": "What is your age?",
"display_type": "range",
"data_type": "number",
"key": "age",
"entry_title": false,
"from": 1,
"to": 100,
"step": 1,
"required": true,
"hint": "Select your age",
"placeholder": "Select age"
},
{
"question": "What is your occupation?",
"display_type": "checkbox",
"data_type": "text",
"key": "occupation",
"required": true,
"hint": "Select all that apply",
"placeholder": "Select occupation",
"default_value": ["STUDENT"],
"choices": ["STUDENT", "EMPLOYEE", "SELF-EMPLOYED", "RETIRED"],
"entry_title": false
},
{
"question": "What is the type of house?",
"display_type": "radio",
"data_type": "text",
"key": "type_of_house",
"required": true,
"hint": "Select the type of house",
"placeholder": "Select type of house",
"default_value": ["BUNGALOW"],
"choices": ["BUNGALOW", "APARTMENT", "DETACHED", "SEMI-DETACHED"],
"entry_title": false
},
{
"question": "Provide a description of yourself",
"display_type": "text_area",
"data_type": "text",
"key": "description",
"entry_title": false,
"min_length": 1,
"max_length": 500,
"required": false,
"hint": "Enter a brief description",
"placeholder": "Describe yourself"
},
{
"question": "What is your email address?",
"display_type": "email",
"data_type": "text",
"key": "email",
"required": false,
"hint": "Enter your email address",
"placeholder": "example@domain.com",
"regex": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"entry_title": false
},
{
"question": "What is your phone number?",
"display_type": "phone",
"data_type": "text",
"key": "phone_number",
"required": true,
"hint": "Enter your phone number",
"placeholder": "Enter phone number",
"regex": "^\\+?[1-9]\\d{1,14}$",
"entry_title": false
}
],
"conditionals": {
"1": "type_of_house == 'APARTMENT' >> room_count",
"2": "age > 18 >> email",
"3": "(income >= 50000 && employment_status != 'UNEMPLOYED') >> loan_eligibility"
}
}