Added functionality to the name text box