I have an "Add Person" form with a few fields (name, address, phone number, etc).
I want to be able to pre-fill some of the fields using information from other fields BEFORE submitting the form. For example, once the user puts in a city, an Ajax query will pull the area-code for the phone number (the Controller has a "city to area code" database) and put it in the phone number field, hoping it will save some typing.
I've tried using observeField, but it seems like it can only change the innerHTML of an element, not the value of an input field.
Any suggestions of how to go about? Thanks.