Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

how put in a select the value of a db table


Go to End


982 Views

Avatar
bebabeba

Community Member, 193 Posts

31 October 2008 at 9:46pm

Hi!
I create a select as explain in guide.
My problem is tha I connect silverstripe to an external database. Here I have "Country" table whit the name of word country. I want to put this value in my select.
To create select I use:
new DropdownField($s, 'Nazione', array(
'Italia'=>'Italia',
'Englad' => 'England'
)),
but write all the value is too much!
Can you help me to solve this problem?