This function allows you to easily hide the survey, something you may wish to do upon submission.
hideSurvey()
NA; used to hide the survey.
if (interactive()) {
library(shiny)
library(shinysurveys)
ui <- fluidPage(
surveyOutput(teaching_r_questions,
survey_title = "Now you see me...",
survey_description = "A demo showing how to hide the survey body upon submission.")
)
server <- function(input, output, session) {
renderSurvey()
observeEvent(input$submit, hideSurvey())
}
shinyApp(ui, server)
}