Use updateInput()
to replace an input's choices and values. Optionally,
a new choices may be selected.
updateInput(id, choices, values = choices, selected = NULL,
session = getDefaultReactiveDomain())
A character string specifying the id of an input.
A character vector or list of tag elements specifying new choices for the input.
An atomic vector specifying new values for the input.
One of values
specifying which choice to select, defaults
to NULL
, in which case a choice is not selected. Note that browsers may
automatically select a choice if not specified.
A reactive context, defaults to getDefaultReactiveDomain()
.
When updating a button input if values
equals choices
, the default value
for values
, the value of the button input is left as is.
Passing a non-numeric value will reset the button input's value.
Files inputs do not currently support updateInput()
.
Form inputs do not support updateInput()
, instead update the specific
inputs within the form.
Other utilities: enableInput
,
invalidateInput