Skip to content

Introduction ​

xyField surveys are defined using a JSON-based schema. This configuration file controls everything about a survey: the project metadata, the fields (questions) shown to the user, and the conditional logic that governs form behavior.

Root Structure ​

The root of the JSON object defines global settings for the survey.

PropertyTypeRequiredDescription
project_titlestringYesHuman-readable name of the survey project
survey_idstringYesUnique identifier for the survey
geometry_typestringYesThe spatial geometry used for data collection (e.g. "point")
gps_accuracy_thresholdnumberNoMaximum acceptable GPS accuracy in meters
capture_altitudebooleanNoWhether to capture the device altitude with the geometry
versionstringYesSchema version in semver format (e.g. "1.0.0")
descriptionstringNoA brief description of the survey's purpose
localeobjectYesLanguage and localization settings (see below)
pagesarrayNoSections that split the form into pages (see Pages)
fieldsarrayYesThe list of questions/inputs in the survey
conditionalsobjectNoSkip logic and auto-assignment rules
json
{
  "project_title": "Land Use Survey",
  "survey_id": "10001",
  "geometry_type": "point",
  "version": "1.0.0",
  "description": "A survey for mapping land use across the district",
  "locale": { ... },
  "pages": [ ... ],
  "fields": [ ... ],
  "conditionals": { ... }
}

Locale Configuration ​

The locale object handles language support for the survey.

PropertyTypeDescription
defaultstringThe default language code used when no preference is set
supportedarrayList of all language codes the survey supports
json
"locale": {
  "default": "en_US",
  "supported": ["en_US", "es_ES", "fr_FR"]
}

Supported locale codes follow the language_REGION format (e.g. en_US for English – United States, fr_FR for French – France).

Pages (Sections) ​

The optional pages array splits a long form into sections. Each field joins a section by setting its section property to a page id. Pages appear in the order they are listed.

PropertyTypeRequiredDescription
idstringYesUnique identifier that fields reference in their section property
labelstringYesSection title shown to the user
json
"pages": [
  { "id": "section_location", "label": "Location & Identification" },
  { "id": "section_owner", "label": "Owner Information" }
],
"fields": [
  { "key": "street_address", "section": "section_location", ... },
  { "key": "owner_name", "section": "section_owner", ... }
]

When a survey defines pages, every field should have a section that matches one of the page ids.