shinysurveys icon indicating copy to clipboard operation
shinysurveys copied to clipboard

GetSurveyData with incomplete questions (matrixInput)

Open cwilligv opened this issue 2 years ago • 1 comments

Hi @jdtrat , First of all, thanks for writing this package, it's been really useful. Here is my question/issue:

My survey uses the matrixInput type for all the questions, however, the user can only select 2 out of 4 options in each question.

  1. Is there a way to check from the server that he has only selected only 2 and show a message otherwise?
  2. Once user has completed all questions (and selected only 2 options per question), I get an error when getting the results with the function GetSurveyData. I guess it's because questions are incomplete, any workaround for that?

thanks for your help.

Christian.

cwilligv avatar Nov 28 '22 04:11 cwilligv

Hi @jdtrat ,

After some thinking I have solved my challenge by creating an extended input type using the object radioMatrixInput from the package shinyRadioMatrix. if my question has 4 options I can now let the user select only 2 and get the results back from the function GetSurveyData. I've manipulated the data in the questions so they can be read by the extended input.

I've written a longer explanation of my solution here in stackoverflow

You can close this issue if you want.

all the best!

cwilligv avatar Dec 02 '22 14:12 cwilligv