Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 821
wipuyotu Avatar asked May 14 '18 10:05

wipuyotu


1 Answers

you can use placeholder option in textInput

textInput(inputId =  "input1", label = h4("Name"), placeholder = "Please provide your name...")
like image 96
A. Suliman Avatar answered Oct 19 '22 14:10

A. Suliman