Remove the text in a shiny::textInput field on mouse click event
Asked Answered
L

1

6

I have a simple textInput:

textInput(inputId = "input1", h4("Name"), value = "Your name")

How can I set an onclick event so that the text completely disappears when the user clicks on the text field? Is this possible via shinyjs::onclick?

Lowdown answered 14/5, 2018 at 10:42 Comment(0)
M
3

you can use placeholder option in textInput

textInput(inputId =  "input1", label = h4("Name"), placeholder = "Please provide your name...")
Marlinemarlinespike answered 14/5, 2018 at 10:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.