1
suico
A selct in a form the xoops way
  • 2005/3/25 21:32

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24


I have this field in my downloads:
$sform->addElement( new XoopsFormText_MD_PLATFORMC'platform'5080 ), false );


I wish to make it a select field instead of a text field with these options in it:

Hora do Rush
Simcity 4
Windows

I know it is something like this:
$sform->addElement( new XoopsFormLabel_MD_PLATFORMC'my options somewhere here?' ) );


Any help? Easiest way?

2
Dave_L
Re: A selct in a form the xoops way
  • 2005/3/25 22:05

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


$default 1// default menu selection
$menu = new XoopsFormSelect(_MD_PLATFORMC'platform'$default1false);
$menu->addOption(1'Hora do Rush');
$menu->addOption(2'Simcity 4');
$menu->addOption(3'Windows');
$sform->addElement($menu);


The strings in addOption should be language constants, instead of literals.

3
suico
Re: A selct in a form the xoops way
  • 2005/3/25 22:20

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24


Thanks dave I used it and it works fine, I ll use language constants now too , again thanks a lot

Login

Who's Online

318 user(s) are online (276 user(s) are browsing Support Forums)


Members: 0


Guests: 318


more...

Donat-O-Meter

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

Latest GitHub Commits