View source: R/utils_javascript-message-handlers.R
hideSurvey | R Documentation |
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) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.