Description Usage Arguments Value See Also Examples
Add a password to a manipulateWidget gadget
1 | mwPassword(value = "", label = NULL, ..., .display = TRUE)
|
value |
Default value of the input. |
label |
Display label for the control. If |
... |
Other arguments passed to function |
.display |
expression that evaluates to TRUE or FALSE, indicating when the input control should be shown/hidden. |
A function that will generate the input control.
Other controls:
mwCheckboxGroup()
,
mwCheckbox()
,
mwDateRange()
,
mwDate()
,
mwGroup()
,
mwNumeric()
,
mwRadio()
,
mwSelectize()
,
mwSelect()
,
mwSharedValue()
,
mwSlider()
,
mwText()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if (require(plotly)) {
manipulateWidget(
{
if (passwd != 'abc123') {
plot_ly(type = "scatter", mode="markers") %>%
layout(title = "Wrong password. True password is 'abc123'")
} else {
plot_ly(data.frame(x = 1:10, y = rnorm(10)), x=~x, y=~y, type = "scatter", mode = "markers")
}
},
user = mwText(label = "Username"),
passwd = mwPassword(label = "Password")
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.