1
coopersita
What is formSelectCountry for?

I noticed a XOOPS drop down menu that lists all the countries. I added the country field to my registation form and I was using it for that. The only problem is that in the database stores the two letter code for the selected country. I want to modify xoopslists.php so that it will store the country name instead of the code, but I don't know if that list is used by some other module or file.

I tried making another form element, but it didn't work.

Any ideas?

2
m0nty
Re: What is formSelectCountry for?
  • 2004/11/1 21:39

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


it's there for if it's ever needed..

but there's no need really to edit it to store country name instead of 2 letter name..

you could do that on the output from a script..

ie

if country = uk then print "United Kingdom"

not a good example, but shud tell u what i mean

they could be defined in a language file too to make things easier..

3
coopersita
Re: What is formSelectCountry for?

I decided to just hardcode the select options into the edituser.php file.

$country_select = new XoopsFormSelect(_US_COUNTRY'country'$xoopsUser->getVar('country'));
    
$country_select->addOption("Afghanistan"); 
$country_select->addOption("Albania"); 
$country_select->addOption("Algeria"); ...

Login

Who's Online

188 user(s) are online (66 user(s) are browsing Support Forums)


Members: 0


Guests: 188


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits