mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
add placeholder option to passwordInput()
This commit is contained in:
2
NEWS
2
NEWS
@@ -47,6 +47,8 @@ shiny 0.13.2.9001
|
||||
|
||||
* navbarMenu now has dividers and dropdown headers (#888)
|
||||
|
||||
* Added `placeholder` option to `passwordInput`.
|
||||
|
||||
shiny 0.13.2
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
#' @examples
|
||||
#' passwordInput("password", "Password:")
|
||||
#' @export
|
||||
passwordInput <- function(inputId, label, value = "", width = NULL) {
|
||||
passwordInput <- function(inputId, label, value = "", width = NULL,
|
||||
placeholder = NULL) {
|
||||
div(class = "form-group shiny-input-container",
|
||||
style = if (!is.null(width)) paste0("width: ", validateCssUnit(width), ";"),
|
||||
label %AND% tags$label(label, `for` = inputId),
|
||||
tags$input(id = inputId, type="password", class="form-control", value=value)
|
||||
tags$input(id = inputId, type="password", class="form-control", value=value,
|
||||
placeholder = placeholder)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
\alias{passwordInput}
|
||||
\title{Create a password input control}
|
||||
\usage{
|
||||
passwordInput(inputId, label, value = "", width = NULL)
|
||||
passwordInput(inputId, label, value = "", width = NULL,
|
||||
placeholder = NULL)
|
||||
}
|
||||
\arguments{
|
||||
\item{inputId}{The \code{input} slot that will be used to access the value.}
|
||||
@@ -15,6 +16,10 @@ passwordInput(inputId, label, value = "", width = NULL)
|
||||
|
||||
\item{width}{The width of the input, e.g. \code{'400px'}, or \code{'100\%'};
|
||||
see \code{\link{validateCssUnit}}.}
|
||||
|
||||
\item{placeholder}{A character string giving the user a hint as to what can
|
||||
be entered into the control. Internet Explorer 8 and 9 do not support this
|
||||
option.}
|
||||
}
|
||||
\value{
|
||||
A text input control that can be added to a UI definition.
|
||||
|
||||
Reference in New Issue
Block a user