Restores every field to the value it was declared with and clears the
validation state. Note this is Element Plus's resetFields(): it restores the
initial values, not empty ones, so a field declared with value = 18
resets to 18.
Usage
el_form_reset(session = shiny::getDefaultReactiveDomain(), id)Arguments
- session
Shiny session; the current one by default, as for
shiny::updateTextInput().- id
Form ID (un-namespaced).
Examples
if (interactive()) {
# inside a server function
observeEvent(input$go, {
el_form_reset(session, "signup")
})
}