You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/2025-11-21-announcing-surveydown-version-1/index.qmd
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -66,13 +66,13 @@ survey-settings:
66
66
use-cookies: no
67
67
auto-scroll: no
68
68
rate-survey: no
69
-
all-questions-required: no
69
+
all-required: no
70
70
start-page: your_first_page
71
71
system-language: en
72
72
highlight-unanswered: yes
73
73
highlight-color: gray
74
74
capture-metadata: yes
75
-
required-questions: []
75
+
required: []
76
76
77
77
system-messages:
78
78
cancel: Cancel
@@ -245,6 +245,10 @@ In this case, the value stored in the data will be automatically converted to sn
245
245
| Dark Green |`dark_green`|
246
246
| Bright Red |`bright_red`|
247
247
248
+
::: {.callout-caution}
249
+
This snake case conversion is **removed** after `v1.1.0`, in which if you provide a single vector of labels, the values stored in the database will be exactly the same as the labels shown to respondents.
250
+
:::
251
+
248
252
## What's Next?
249
253
250
254
This `v1.0.0` release marks a major milestone for `surveydown`, but we're not stopping here. We have exciting features planned for future releases. Stay tuned!
The `sd_value()` function returns the chosen value or values for one or more questions. It is a reactive function and can only be used inside the `server()` function in your **app.R** file.
4
+
5
+
See the [Accessing Question Values](accessing-values.qmd) page for details on how to use `sd_value()`.
Copy file name to clipboardExpand all lines: chunks/skip-if.qmd
+3-9Lines changed: 3 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
While basic page navigation is handled using `sd_nav()`, you can override this static navigation in your server function with the `sd_skip_if()` function to send the respondent to a forward page based on some condition.
1
+
While basic page navigation is handled automatically (or with the `sd_nav()` function for more fine-tuned control), you can override this static navigation in your server function with the `sd_skip_if()` function to send the respondent to a forward page based on some condition.
2
2
3
3
A common example is the need to **screen out** people based on their response(s) to a question. Let's say you need to screen out people who do not own a vehicle. To do this, you would first define a question in your **survey.qmd** file about their vehicle ownership, e.g.:
4
4
@@ -26,17 +26,11 @@ Sorry, but you are not qualified to take our survey.
26
26
27
27
Then in the server function in the **app.R** file, you can use the `sd_skip_if()` function to define the condition under which the respondent will be sent to the target `screenout` page, like this:
28
28
29
-
::: {.callout-note}
30
-
31
-
The `input` object is a Shiny object that stores each question `id` defined by `sd_question()` in your **survey.qmd** file, so whenever referring to a question in a condition, you must use the format `input$question_id`.
@@ -48,6 +42,6 @@ You can provide multiple conditions to the `sd_skip_if()` function, each separat
48
42
49
43
> `<condition> ~ "target_page_id"`
50
44
51
-
In the example above, `input$vehicle_ownership == "no"` is the condition, and `"screenout"` is the target page that the respondent will be sent to if the condition is met.
45
+
In the example above, `sd_value("vehicle_ownership") == "no"` is the condition, and `"screenout"` is the target page that the respondent will be sent to if the condition is met.
52
46
53
47
Take a look at the [Common Conditions](conditional-logic.html#common-conditions) section for examples of other types of supported conditions you can use to conditionally control the survey flow.
0 commit comments