Table of Contents
Save
When the user presses the Save button, this triggers the save behavior.
snapLocation
Setting snapLocation
to the name of a geopoint
question will create a popup to acquire the GPS location. This feature is only active when wizardMode
is enabled.
type | name | label |
---|---|---|
geopoint | f_location | Location |
select_one animal | f_animal | Animal |
text | f_note | Note |
surveychoicessettings |
title | bind::ct:save.snapLocation | |
---|---|---|
My form | f_location | |
surveychoicessettings |
In this example, the user flow will be:
targets
In the example below, the user will be presented with a popup containing the choices Restart or Another. After the sighting is saved, a new sighting will be created starting at the targeted question. All prior question data will be replicated into the new sighting.
This value must be a valid JSON array.
type | name | label |
---|---|---|
select_one animal | f_animal | Animal |
select_multiple behavior | f_behavior | Behavior |
text | f_note | Note |
surveychoicessettings |
restart
and another
are taken from the choices
sheet in the saveTargets
list name.
list_name | name | label |
---|---|---|
saveTarget | restart | Restart |
saveTarget | another | Another |
surveychoicessettings |
Note that question
is the name of the targeted question in the survey
table. If the question is not relevant, then this choice will be hidden.
title | bind::ct:save.targets | |
---|---|---|
My form | [{ "choice": "restart", "question": "f_animal"}, { "choice": "another", "question": "f_behavior"}] | |
surveychoicessettings |
Note that if immersive
is set to false, then the target list will automatically contain the home button. This option will save and return to the Home page without automatically creating a new sighting.
track
In the example below, there is a select_one
question called f_track
with choices start
, stop
and nochange
. When the user presses Save, the track timer is adjusted depending on which choice was selected. The values in updateIntervalSeconds
and distanceFilterMeters
are the new track settings.
This value must be a valid JSON array.
type | name | label | appearance |
---|---|---|---|
file | f_track_file | Track file | hidden |
select_one track_items | f_track | Configure track | |
text | f_note | Note | |
surveychoicessettings |
list_name | name | label |
---|---|---|
track_items | start | Start |
track_items | stop | Stop |
track_items | nochange | No change |
surveychoicessettings |
title | bind::ct:save.trackFile | bind::ct:save.track |
---|---|---|
My form | f_track_file | [{ "condition": "selected(${f_track}, 'start')", "updateIntervalSeconds": 5, "distanceFilterMeters": 10 }, { "condition": "selected(${f_track},'stop')", "updateIntervalSeconds": 0, "snapTrack": true }] |
surveychoicessettings |
condition
is an XlsForm expression which activates this option if matched, e.g. ${start_stop}=’start’. Check out the ODK Form Logic documentation.
updateIntervalSeconds
is the number of seconds between GPS readings. Set to 0 to disable the track timer.
distanceFilterMeters
is the minimum distance between readings in meters. This is optional and by default no distance filter is used.
snapTrack
causes the system to snapshot all the track points (since prior snap).
If using Survey123 and locationServiceUrl
is specified, then the track data will be sent to the feature service. Otherwise, a track file will be created and added to a file
type question in the form. See the section on the track file here.