Make a sd_is_answered() function
#122
Closed
jhelvy
started this conversation in
Feature Requests
Replies: 1 comment
-
|
This is now complete as of v0.3.7 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be really helpful if we could determine whether a question was answered or not. This function would just return
TRUEorFALSEdepending on whether a user has clicked on a choice or typed some text, etc.The use case I imagine for this would be inside
sd_show_iforsd_skip_ifwhere a user wants a condition on whether the conditional question has been answered at all or not. The only way to do this right now is to include a full set of conditions for all options, which is tedious. I'm imagining the use case like this:sd_show_if( sd_is_answered(input$question_id) ~ "target_question_id" )A special consideration of this is matrix type questions, as mentioned in #105 here. We should be able to tell if any one row in a matrix type question is answered as well as if all rows are answered. For example:
For the above matrix type question, we should be able to condition on a single row like this:
sd_show_if( sd_is_answered(input$car_preference_buy_gasoline) ~ "target_question_id" )And also on the entire matrix like this (here this would be
TRUEonly if all rows are answered:sd_show_if( sd_is_answered(input$car_preference) ~ "target_question_id" )Beta Was this translation helpful? Give feedback.
All reactions