Pagination and autocompletion for input box