auto fill-in

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sirTemplar
Forum Commoner
Posts: 65
Joined: Wed Dec 18, 2002 1:57 am

auto fill-in

Post 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!
Rob the R
Forum Contributor
Posts: 128
Joined: Wed Nov 06, 2002 2:25 pm
Location: Houston

Post 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.
Post Reply