checkboxGroupInput
checkboxGroupInput(inputId, label, choices, selected = NULL, inline = FALSE)
Arguments
inputId | Input variable to assign the control's value to. |
---|---|
label | Display label for the control, or NULL . |
choices | List of values to show checkboxes for. If elements of the list are named then that name rather than the value is displayed to the user. |
selected | The values that should be initially selected, if any. |
inline | If TRUE , render the choices inline (i.e. horizontally) |
Checkbox Group Input Control
Value
A list of HTML elements that can be added to a UI definition.
Description
Create a group of checkboxes that can be used to toggle multiple choices independently. The server will receive the input as a character vector of the selected values.
Examples
checkboxGroupInput("variable", "Variable:", c("Cylinders" = "cyl", "Transmission" = "am", "Gears" = "gear"))<div id="variable" class="control-group shiny-input-checkboxgroup"> <label class="control-label" for="variable">Variable:</label> <label class="checkbox"> <input type="checkbox" name="variable" id="variable1" value="cyl"/> <span>Cylinders</span> </label> <label class="checkbox"> <input type="checkbox" name="variable" id="variable2" value="am"/> <span>Transmission</span> </label> <label class="checkbox"> <input type="checkbox" name="variable" id="variable3" value="gear"/> <span>Gears</span> </label> </div>
See also
checkboxInput
, updateCheckboxGroupInput
Other input.elements: actionButton
,
actionLink
; animationOptions
,
sliderInput
; checkboxInput
;
dateInput
; dateRangeInput
;
fileInput
; numericInput
;
radioButtons
; selectInput
,
selectizeInput
; submitButton
;
textInput