modalInputs: Create list of shiny inputs for modal

Description Usage Arguments

View source: R/addEditModules.R

Description

Takes a data.frame containing information about shiny inputs and additional optional parameters to create list of shiny inputs to be displayed in a modal

Usage

1
2
3
4
5
6
7
modalInputs(
  ns = ns,
  inputData,
  values,
  choices,
  session = shiny::getDefaultReactiveDomain()
)

Arguments

ns

namespace function passed from calling environment

inputData

a data.frame containing columns ids, labels, type, choicesTable, choicesValues, choicesLabels which correspond to

ids

The field names in the database. These ids will also be used as the inputId for shiny inputs.

labels

These are character values which will be used as the label for shiny inputs and be displayed above the input in the UI.

type

The type of shiny input to be used.

choicesTable, choicesValues, choicesLabels

Only used if the desired input has predefined choices (selectInput/selectizeInput). If neither of these inputs are used, then the values should be NA. If one of these inputs is used then:

choicesTable

Is the table in the database where the choices for the given input are.

choicesValues

Is the column in the table which stores the numeric identifier for the choice

choicesLabels

Is the column in the table which stores the character name for the choices

values

Optional argument to be used when the inputs are being populated from an observation in the database. (NEED MORE DOCUMENTATION HERE ONCE THE EDIT FUNCTIONALITY IS BUILT OUT)

choices

Optional argument to provide the choices for selectInput and selectizeInput inputs.

session

These parameters are handled by callModule and can be ignored.


JamesCuster/CARTMod documentation built on March 8, 2020, 5:57 a.m.