Description
Generates a new form schema object which can be used to add a new form to ActivityInfo.
Usage
formSchema(
databaseId,
label,
id = cuid(),
elements = list(),
folderId = databaseId
)
Arguments
Argument | Description |
---|---|
databaseId |
The identifier of the database containing the form |
label |
The label of the form |
id |
The identifier of the form; if unused will generate a new cuid |
elements |
The elements/form fields of the form |
folderId |
The identifier of the folder containing the form |
Examples
survey <- formSchema(
databaseId = "cyx12345gh",
label = "ActivityInfo form generated from R",
elements = list(
textFieldSchema(label = "What is your name?", code = "name", required = TRUE),
dateFieldSchema(label = "When were you born?", code = "dob")))
addForm(survey)