Renders the survey instrument and collects the respondent's answers.
Returns a reactive that holds NULL until the form is submitted, then
returns the response as a named list (one element per visible item).
Arguments
- id
A character string matching the
idpassed tosurvey_module_ui().- instrument
An
sframeobject, or areactivethat returns one. Changing the reactive value resets the survey.- on_submit
Optional function of one argument. Called immediately after submission with the response list. Useful for writing to a database or sending an email without waiting for an
shiny::observeEvent()elsewhere in the app.