shinysurveys
shinysurveys copied to clipboard
Feature idea: multiple surveys?
Hi, I'm getting back into using the package and loving its features! It is so useful. I'm planning to put some live surveys on shinyapps.io soon.
Do you have plans to support multiple surveys per shiny app? I can envision having dynamic surveys that popup in the course of a user journey or letting users select different surveys on different tabs. To accomplish this, I presume the package would need to allow for different id's (and labels) for each survey's "submit" actionButton and to have survey ids and tags for the different surveys when outputting survey data using getSurveyData().
--Neil
Hi Neil! That's an interesting idea. I don't have any plans for this right now but will think about possible implementations.
I made a workaround by using a dialog box on startup to have the user select a survey, which is then rendered with different data frames depending on their choice.
See the github archive here: https://github.com/nklepeis/AirSurveys The deployed shinyapp here: https://nklepeis.shinyapps.io/AirSurveys/
Some issues:
-
On the first visit to the shinyapp URL there is an error that crashes the survey, but when reloading it starts working OK. The error when run locally is: Warning: Error in <-: 'names' attribute [1] must be the same length as the vector [0] 1: shiny::runApp
-
Occasionally I notice that the "Submit" button is unavailable even though all of the questions are marked required=FALSE.. This is intermittent so I haven't been able to track it down.
Thanks again for this great package. I would love eventually to have more flexibility in creating multiple on-demand polls/surveys inside a complex shiny app, but for now the above solution seems to work for my present needs.
--Neil