placeholder <- function(inputId, condition, valuesElec, valuesGas) {
updateTextInput(inputId = inputId,
placeholder = if(condition) valuesElec else valuesGas)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.