I usually use a popup window for this kind of situation.
In that popup, you can see a gridview of the items, with search and soft functionality. And when you have selected an item, it will fill the id of the item to the target field.
Another solution may be jQuery UI autocomplete. It could be a little smarter.
Unfortunately both the solutions require some experience and skill. And I can not explain them in details for your current scenario.
Link your input form from the index list or view page of that foreign model, then you can assign the id beforehand.