How to prepopulate the textbox once I clicked the textbox. Initially Textbox will be empty, only after I clicked it should get populated.
Discussion posts and replies are publicly visible
What value do you want to populate? On the button click you can do it or if you don't want to do it an extra click then on the save into of any other component you can save the value into the variable and use that variable to show the value into the field.