formFieldSchema: Create a simple form field schema object

View source: R/formField.R

formFieldSchemaR Documentation

Create a simple form field schema object

Description

This is the function to create a basic form field schema object. It is recommended to use the specific functions for each schema type such as textFieldSchema() or serialNumberFieldSchema().

Usage

formFieldSchema(
  type,
  label,
  description = NULL,
  code = NULL,
  id = cuid(),
  key = FALSE,
  required = FALSE,
  hideFromEntry = FALSE,
  hideInTable = FALSE,
  relevanceRule = "",
  validationRule = "",
  reviewerOnly = FALSE,
  typeParameters = NULL
)

Arguments

type

The type character string defining the form field type.

label

The label of the form field

description

The description of the form field

code

The code name of the form field

id

The id of the form Field; default is to generate a new cuid

key

Whether the form field is a key field; default is FALSE

required

Whether the form field is required; default is FALSE

hideFromEntry

Whether the form field is hidden during data entry; default is FALSE

hideInTable

Whether the form field is hidden during data display; default is FALSE

relevanceRule

Relevance rules for the form field given as a single character string; default is ""

validationRule

Validation rules for the form field given as a single character string; default is ""

reviewerOnly

Whether the form field is for reviewers only; default is FALSE

typeParameters

The type parameters object specific to the type given.

See Also

Other field schemas: attachmentFieldSchema(), barcodeFieldSchema(), calculatedFieldSchema(), dateFieldSchema(), geopointFieldSchema(), monthFieldSchema(), multilineFieldSchema(), multipleSelectFieldSchema(), quantityFieldSchema(), referenceFieldSchema(), sectionFieldSchema(), serialNumberFieldSchema(), singleSelectFieldSchema(), subformFieldSchema(), userFieldSchema(), weekFieldSchema()


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