I am designing a web form. In the form, there are several fields, values of which are dependent upon a key field. I have 2 options to present the form to the user.
1) Make the user do a search on the key field first and then present the form with the dependent fields populated.
2) Present the form and have the user enter a value in the key field. Populate dependent fields via an AJAX call as soon as the user leaves the key field. I may have to put a 'loading..' image next to the key field in case the AJAX call takes longer.
I have seen the first option at many web sites. I do not recall seeing the second option. Has anyone seen web forms that use something similar to the first option? Is there a better way of doing this?