4424 Posts in 1267 Topics by 945 members
Customising the CMS
SilverStripe Forums » Customising the CMS » drop down with list values in forms
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 712 Views |
-
drop down with list values in forms

23 June 2009 at 7:56am Last edited: 23 June 2009 7:58am
I've seen this in the e-commerce module and wanted to know how to use it in the CMS for custom drop-downs:
if( ! $fields->fieldByName( 'Country' ) ) $fields->push(new DropdownField('Country', 'Country', Geoip::getCountryDropDown()));
}This one clearly calls a function to get the GEO target, but how do I add a list of values here? Oh, and for this example as well, how do I add a default value if nothing is found?
Thanks for any hep in advance!
| 712 Views | ||
|
Page:
1
|
Go to Top |

