To automatically handle enter key press and pressing the button with submit.