View source: R/form_schema_parse.R
form_schema_parse | R Documentation |
form_schema_parse(fs, path = "Submissions", verbose = get_ru_verbose())
fs |
The output of form_schema as nested list |
path |
The base path for form fields. Default: "Submissions".
|
verbose |
Whether to display debug messages or not. Read |
This function is used by form_schema
for older versions of
ODK Central (pre 0.8). These return the form schema as XML, requiring the
quite involved code of form_schema_parse
, while newer ODK
Central versions return JSON, which is parsed directly in
form_schema
.
The form_schema
returned from ODK Central versions < 0.8 is a nested list
of lists containing the form definition.
The form definition consists of fields (with a type and name), and form
groups, which are rendered as separate ODK Collect screens.
Form groups in turn can also contain form fields.
form_schema_parse
recursively unpacks the form and extracts the
name and type of each field. This information then informs
handle_ru_attachments
, handle_ru_datetimes
,
handle_ru_geopoints
, handle_ru_geotraces
, and
handle_ru_geoshapes
.
Other utilities:
attachment_get()
,
attachment_link()
,
attachment_url()
,
drop_null_coords()
,
get_one_attachment()
,
get_one_submission()
,
get_one_submission_att_list()
,
get_one_submission_audit()
,
handle_ru_attachments()
,
handle_ru_datetimes()
,
handle_ru_geopoints()
,
handle_ru_geoshapes()
,
handle_ru_geotraces()
,
isodt_to_local()
,
odata_submission_rectangle()
,
predict_ruodk_name()
,
prepend_uuid()
,
split_geopoint()
,
split_geoshape()
,
split_geotrace()
,
strip_uuid()
,
tidyeval
,
unnest_all()
## Not run:
# Option 1: in two steps, ODKC Version 0.7
fs <- form_schema(flatten = FALSE, parse = FALSE, odkc_version = 0.7)
fsp <- form_schema_parse(fs)
# Option 2: in one go
fsp <- form_schema(parse = TRUE)
fsp
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.