The attached patch against DRUPAL-6--3 adds a list of currencies, as long as the Currency API module is installed and activated.

Originally from roball's patch at http://drupal.org/node/406486#comment-2823478

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roball’s picture

Yes, better to discuss each new select list in a separate issue.

Only depends on the "Currency API" module (part of the Currency Exchange module project). However, Webform will *not* be dependent on that module, of course.

I am using that patch successfully with Webform's latest 6.x-3.0 dev. It (as of Currency 6.x-1.2) provides the following select list:

AFA|Afghanistani Afghani (AFA)
ALL|Albanian Lek (ALL)
DZD|Algerian Dinar (DZD)
ARS|Argentine Peso (ARS)
AWG|Aruba Florin (AWG)
AUD|Australian Dollar (AUD)
AZN|Azerbaijan New Maneat (AZN)
BSD|Bahamian Dollar (BSD)
BHD|Bahraini Dinar (BHD)
BDT|Bangladeshi Taka (BDT)
BBD|Barbadian Dollar (BBD)
BYR|Belarus Ruble (BYR)
BZD|Belize Dollar (BZD)
BMD|Bermuda Dollar (BMD)
BTN|Bhutanese Ngultrum (BTN)
BOB|Bolivian Boliviano (BOB)
BAM|Bosnia and Herzegovina Convertible Marka (BAM)
BWP|Botswana Pula (BWP)
BRL|Brazilian Real (BRL)
GBP|British Pound (GBP)
BND|Brunei Dollar (BND)
BGN|Bulgarian Lev (BGN)
BIF|Burundi Franc (BIF)
KHR|Cambodia Riel (KHR)
CAD|Canadian Dollar (CAD)
CVE|Cape Verdean Escudo (CVE)
KYD|Cayman Islands Dollar (KYD)
XOF|CFA Franc (BCEAO) (XOF)
XAF|CFA Franc (BEAC) (XAF)
CLP|Chilean Peso (CLP)
CNY|Chinese Yuan (CNY)
COP|Colombian Peso (COP)
KMF|Comoros Franc (KMF)
CRC|Costa Rica Colon (CRC)
HRK|Croatian Kuna (HRK)
CUP|Cuban Peso (CUP)
CYP|Cyprus Pound (CYP)
CZK|Czech Koruna (CZK)
DKK|Danish Krone (DKK)
DJF|Dijiboutian Franc (DJF)
DOP|Dominican Peso (DOP)
XCD|East Caribbean Dollar (XCD)
EGP|Egyptian Pound (EGP)
SVC|El Salvador Colon (SVC)
ERN|Eritrean Nakfa (ERN)
EEK|Estonian Kroon (EEK)
ETB|Ethiopian Birr (ETB)
EUR|Euro (EUR)
FKP|Falkland Islands Pound (FKP)
FJD|Fiji Dollar (FJD)
GMD|Gambian Dalasi (GMD)
GHC|Ghanian Cedi (GHC)
GIP|Gibraltar Pound (GIP)
XAU|Gold Ounces (XAU)
GTQ|Guatemala Quetzal (GTQ)
GGP|Guernsey Pound (GGP)
GNF|Guinea Franc (GNF)
GYD|Guyana Dollar (GYD)
HTG|Haiti Gourde (HTG)
HNL|Honduras Lempira (HNL)
HKD|Hong Kong Dollar (HKD)
HUF|Hungarian Forint (HUF)
ISK|Iceland Krona (ISK)
INR|Indian Rupee (INR)
IDR|Indonesian Rupiah (IDR)
IRR|Iran Rial (IRR)
IQD|Iraqi Dinar (IQD)
ILS|Israeli Shekel (ILS)
JMD|Jamaican Dollar (JMD)
JPY|Japanese Yen (JPY)
JOD|Jordanian Dinar (JOD)
KZT|Kazakhstan Tenge (KZT)
KES|Kenyan Shilling (KES)
KRW|Korean Won (KRW)
KWD|Kuwaiti Dinar (KWD)
KGS|Kyrgyzstan Som (KGS)
LAK|Lao Kip (LAK)
LVL|Latvian Lat (LVL)
LBP|Lebanese Pound (LBP)
LSL|Lesotho Loti (LSL)
LRD|Liberian Dollar (LRD)
LYD|Libyan Dinar (LYD)
LTL|Lithuanian Lita (LTL)
MOP|Macau Pataca (MOP)
MKD|Macedonian Denar (MKD)
MGA|iraimbilanja
MWK|Malawian Kwacha (MWK)
MYR|Malaysian Ringgit (MYR)
MVR|Maldives Rufiyaa (MVR)
MTL|Maltese Lira (MTL)
MRO|Mauritania Ougulya (MRO)
MUR|Mauritius Rupee (MUR)
MXN|Mexican Peso (MXN)
MDL|Moldovan Leu (MDL)
MNT|Mongolian Tugrik (MNT)
MAD|Moroccan Dirham (MAD)
MZM|Mozambique Metical (MZM)
MMK|Myanmar Kyat (MMK)
NAD|Namibian Dollar (NAD)
NPR|Nepalese Rupee (NPR)
ANG|Neth Antilles Guilder (ANG)
TRY|New Turkish Lira (TRY)
NZD|New Zealand Dollar (NZD)
NIO|Nicaragua Cordoba (NIO)
NGN|Nigerian Naira (NGN)
KPW|North Korean Won (KPW)
NOK|Norwegian Krone (NOK)
OMR|Omani Rial (OMR)
XPF|Pacific Franc (XPF)
PKR|Pakistani Rupee (PKR)
XPD|Palladium Ounces (XPD)
PAB|Panama Balboa (PAB)
PGK|Papua New Guinea Kina (PGK)
PYG|Paraguayan Guarani (PYG)
PEN|Peruvian Nuevo Sol (PEN)
PHP|Philippine Peso (PHP)
XPT|Platinum Ounces (XPT)
PLN|Polish Zloty (PLN)
QAR|Qatar Rial (QAR)
RON|Romanian New Leu (RON)
RUB|Russian Rouble (RUB)
RWF|Rwandese Franc (RWF)
WST|Samoan Tala (WST)
STD|Sao Tome Dobra (STD)
SAR|Saudi Arabian Riyal (SAR)
SCR|Seychelles Rupee (SCR)
RSD|Serbian Dinar (RSD)
SLL|Sierra Leone Leone (SLL)
XAG|Silver Ounces (XAG)
SGD|Singapore Dollar (SGD)
SKK|Slovak Koruna (SKK)
SBD|Solomon Islands Dollar (SBD)
SOS|Somali Shilling (SOS)
ZAR|South African Rand (ZAR)
LKR|Sri Lanka Rupee (LKR)
SHP|St Helena Pound (SHP)
SDD|Sudanese Dinar (SDD)
SRD|Surinam Dollar (SRD)
SZL|Swaziland Lilageni (SZL)
SEK|Swedish Krona (SEK)
CHF|Swiss Franc (CHF)
SYP|Syrian Pound (SYP)
TWD|Taiwan Dollar (TWD)
TZS|Tanzanian Shilling (TZS)
THB|Thai Baht (THB)
TOP|Tonga Pa'anga (TOP)
TTD|Trinidad & Tobago Dollar (TTD)
TND|Tunisian Dinar (TND)
USD|U.S. Dollar (USD)
AED|UAE Dirham (AED)
UGX|Ugandan Shilling (UGX)
UAH|Ukraine Hryvnia (UAH)
UYU|Uruguayan New Peso (UYU)
UZS|Uzbekistan Sum (UZS)
VUV|Vanuatu Vatu (VUV)
VEB|Venezuelan Bolivar (VEB)
VND|Vietnam Dong (VND)
YER|Yemen Riyal (YER)
YUM|Yugoslav Dinar (YUM)
ZMK|Zambian Kwacha (ZMK)
ZWD|Zimbabwe Dollar (ZWD)
roball’s picture

I have read in another thread that you are planning to release beta 5 this weekend. Do you think this patch has a chance to get in?

quicksketch’s picture

Right now I'm nervous about a select list that has 500+ items, it could cause a significant slow-down when used with Options Element. I want to test it out first and I don't think this isn't a very high priority overall, so it might have to wait until after beta 5.

roball’s picture

I think you thought about another request - #765616: Time zone list add to pre-built lists where the suggested list contains of 564 options.

The list here has only 161 options. I am using it with the Options Element module - works fine for me.

quicksketch’s picture

Oh you're right, I was thinking about the Time zone list. I'm still not 100% on this option. It looks to me like the list provided by Currency API is intended to be used for administrative purposes rather than something a front-end user would encounter. Then again, I don't think there's a large amount of overlap between Webform users and Currency users. I'd like to populate the options for pre-defined select lists with meaningful options for the majority of users, I'm not sure that a list of all the world's currencies really fits that.

quicksketch’s picture

Status: Active » Closed (won't fix)

This won't be added as an option to Webform directly. Note that it could just as easily be added to Currency module (if they're interested in it), by implementing hook_webform_select_options_info() in currency.module.