Conditional logic: Not able to copy HTML text to textbox field