functional on enter in input field or click on submit