Forums

Creating a double drop-down

Kid_Pharma 12 Jan, 2011
Hi All, I'm trying to create a double drop-down form wich will validate prov/state vs choosing a country. There is a basic example similar to this in the "ChronoForms 3.1 for
Joomla! Site Cookbook" that i bought last week but the way it validates the select box is by using numbers in the value field. In my country select box, I am using the country's name as the value since I have to send the result in an email. Any hints would be greatly appreciated. Tx🙂
GreyHead 13 Jan, 2011
Hi Kid_Pharma,

To use the names rather than numbers you'd need to create an array of the country names and loop through that in the same way.

Personally I would still use country codes rather than names in the option values, then look up the value in an array to insert the name in the email.

Bob

PS There's a double drop-down with Ajax in a doc you an buy here for a few dollars. I'd use this if the list is long.
Kid_Pharma 14 Jan, 2011
Thank you, we will look at it. 🙂
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger