shiny_widget_translation | R Documentation |
A collection of functions to map REDCap question types as exported by the REDCap API to native Shiny widgets.
shinyREDCap_textInput(id, field_label, value = NULL, placeholder = NULL, ...)
shinyREDCap_dateInput(id, field_label, value = NULL, ...)
shinyREDCap_dropdown(id, field_label, required, choices, value = NULL, ...)
shinyREDCap_truefalse(id, field_label, required, value = NULL, ...)
shinyREDCap_yesno(id, field_label, required, value = NULL, ...)
shinyREDCap_radio(id, field_label, required, choices, value = NULL, ...)
shinyREDCap_checkbox(id, field_label, choices, value = NULL, ...)
shinyREDCap_notes(id, field_label, value = NULL, ...)
shinyREDCap_integer(id, field_label, value = NULL, ...)
id |
A string, containing a globally unique REDCap question identifier. Used to create a valid Shiny inputID. |
field_label |
A string containing the question being asked. May contain html formatting. |
value |
Default value or previous data if question has previously been answered |
placeholder |
Placeholder text to help a reviewer decide how to answer the question |
... |
Any additional parameters to pass to shiny widget inputs. |
required |
A string, "yes" or "no". Is this a required REDCap question type? |
choices |
REDCap choices for the question. |
A shiny input widget for the UI
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.