PDA

View Full Version : ComboBox



boston-george
7 Jun 2011, 3:24 AM
Hi guys!

i'm try to create a combobx in php!

what's is wrong ?



$dataC = array('cmbBCCZO' => array(array('id' => 0,'name' => 'Hello'),
array('id' => 1,'name' => 'World')
),
);
$fields[] = array('id','name');

$storeBCCZO = array("xtype"=>"jsonstore", "root"=>"cmbBCCZO", "fields"=>$fields, "data"=>$dataC);


$txtfd3[] = array("xtype"=>"combo", "id"=>"BCCZO", "x"=>100, "y"=>3, "emptyText"=>"Sel..", "hideTrigger"=>false, "TriggerAction"=>"all", "editable"=>false, "DisplayField"=>"name", "valueField"=>"id", "mode"=>"local", "width"=>200, "store"=>$storeBCCZO);


firebug no show errores but when i click into combobx no whoe info!
thanks

skirtle
9 Jun 2011, 5:24 PM
You haven't really explained how this PHP converts into client-side JavaScript. It'd be more useful to post a sample of the JavaScript or JSON output of the PHP rather than the PHP itself. Is this generating a JSON response to an Ajax request that creates components using xtypes?

All that said, triggerAction and displayField are both in initial caps in your example, I suspect you'll need camel-case.

boston-george
9 Jun 2011, 11:25 PM
thanks!

the problem is camel-case.

It's generate a JSON response to an Ajax request that creates components using .add()