Home > other >  Textinput in Shiny - How to cancel autocomplete
Textinput in Shiny - How to cancel autocomplete

Time:06-27

I use textinput:

 textInput("password_input", label=h4(":pass"),value = "", width = "50%")

enter image description here

and I want to cancel the autocomplete that show me the last choices

any suggetion?

CodePudding user response:

If you can't use passwordInput we can use htmltools::tagQuery to set autocomplete = "off":

library(shiny)
library(htmltools)

ui <- fluidPage(
  tagQuery(textInput("test", "test"))$find("input")$addAttrs("autocomplete" = "off")$allTags()
)

server <- function(input, output, session) {
  
}

shinyApp(ui, server)
  • Related