created submit on enter functionality for the input field