new ludo.form.Select(config)
Select box (<select>)
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
Properties
|
- Source:
Examples
{ type:'form.Select', name:'country', valueKey:'id', textKey:'title', emptyItem:{ id:'',title:'Where do you live?' }, dataSource:{ resource:'Country', service:'read' } } to populate the select box from the Country service on the server. The "id" column will be used as value for the options and title for the displayed text.
{ type:'form.Select', emptyItem:{ value:'',text:'Please select an option' }, options:[ { value:'1',text : 'Option a' }, { value:'2',text : 'Option b' }, { value:'3',text : 'Option c' } ] }
Methods
-
addOption(value, text)
-
Add new option element
Parameters:
Name Type Description value
String text
String - Source: