3
votes

I see that textInput has a default value field. However, I can't seem to figure out how to dynamically set the default value field. Lets say I have a selectInput, I want the default value of my textInput to be the value selected in selectInput but with some text appended to it, which the user can freely edit.

On the ui side where I have the textInput I obviously can't do anything like value=paste0(output$selectName,"_someText") because I can't use output.

I'm guessing the answer involves some code on the server side that updates the textInput. I can't seem to figure how to get updateTextInput to do what I want, even though it sounds like what I want. Any advice on dynamically generating a default value for a textInput would be appreciated.

Regards

1

1 Answers

3
votes

It appears that I needed to use observe in the server side and then updateTextInput worked.