addForm: Adds a new form to a database

View source: R/forms.R

addFormR Documentation

Adds a new form to a database

Description

Adds a new form to a database

Usage

addForm(...)

## S3 method for class 'formSchema'
addForm(schema, parentId = NULL, folderId = NULL, ...)

## S3 method for class 'character'
addForm(databaseId, schema, ...)

## Default S3 method:
addForm(databaseId, schema, ...)

Arguments

...

ignored

schema

the schema of the form to add

parentId

the id of the database or folder to which this form should be added (optional; defaults to the database id)

folderId

this argument is deprecated and superceded by parentId. Use folderId in formSchema().

databaseId

the id of the database (optional)

See Also

formSchema, formFieldSchema, vignette("add-and-manipulate-forms", package = "activityinfo")

Examples

## Not run: 
addForm(formSchema(
  databaseId = myDatabaseId,
  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"))))

## End(Not run)

bedatadriven/activityinfo-R documentation built on Dec. 21, 2024, 8:23 a.m.