Is there a way to embed data into the survey? #215
DescriptionIs there a way to embed data to the survey response that isn't tied to a question exposed to the respondent? For example, if I were to use some responses to calculate a score, or if I wanted to store the unique panel_id of the respondent in my response record (not just for redirecting back to the panel provider). I saw this tutorial on the latter: But I wasn't sure how I could save those parameters into the database. Many of my surveys have embedded data. I'd love to replicate with surveydown. |
Replies: 1 comment 1 reply
|
Take a look at the reactivity page. We have a function called We also have a more streamlined way to compute values and store them at once with |
Take a look at the reactivity page.
We have a function called
sd_store_value()that you can use in the server function to store values in your database. For example, in this example we show how to generate a completion code, store it in your database, then display it later.We also have a more streamlined way to compute values and store them at once with
sd_reactive(), see this example. Withsd_reactive(), the computed value automatically gets stored in your database, so no need to usesd_store_value()in that case.