input search form : validate when "enter key " is pressed & previous result from the search

Check if all the search form are submitted when the enter key is pressed and check if the previous result of the search is shown in the input