Page 1 of 1

auto fill-in

Posted: Wed Jan 22, 2003 3:40 pm
by sirTemplar
hi again.

let's say i have a database with this fields:

name
surname
country code
country_english
country_italian
country_german

and i have a form that inputs only the first three, i.e.

name
surname
country code

is it possible that when the country code is filled. the rest:
country_english
country_italian
country_german

will be filled in automatically? what is the easiest way? the reason for doing this is to not to type manually the country in other languages by those who fill in the form!

Posted: Wed Jan 22, 2003 4:16 pm
by Rob the R
I would use Javascript for something like this. You can add an "onChange" handler to the country code field that would then assign values to the other form fields. This means that you'll have to build a Javascript array or two (or three) that has the decoded values for the country code.