How can I make a reusable autocomplete form?