View Full Version : select Field add options

12 Apr 2012, 3:32 AM

I have a form where inside is a select Field. I want to add options to this field. I found in the documentation only a setOptions function is there also a function like addOptions or do I have to use a store and save there the different options? My code in the controller looks so:

var agent = this.getSettingsAgent();
MobileLogin.app.callFn('account.getUsers', function(result,error){
agent.setOptions({text: result[0].name, value: 'somevalue'},

As to see i get the selectField and named it agent. After that i make a server call which send me arrays back. I want to add data from the array in the select field. Did i really need to save the array in a store to add the options to the selectField?

16 Apr 2012, 9:48 AM
Is this a Sencha Touch 2 question?

17 Apr 2012, 12:21 AM
I fixed my problem and yes it is a sencha touch 2 question. I saw it just right now that it is in the wrong forum sorry

24 Mar 2016, 12:26 AM
Can you display the code