Ejemplo: en mi BD tengo
VALOR: 1
ETIQUETA: EJEMPLO 1
En vez de enviarme "1", me envia "EJEMPLO 1", y no hayo que hacer.
Aca les copio mi codigo:
Código HTML:
//Stores
var organismos = new Ext.data.Store({
autoLoad: true,
proxy: new Ext.data.HttpProxy({
url: '../JSON/organismos.php',
method: 'POST'
}),
reader: new Ext.data.JsonReader({
root: 'data'
}, [
{name: 'valor'},
{name: 'organismo'}
])
});
var recursos = new Ext.data.Store({
autoLoad: true,
proxy: new Ext.data.HttpProxy({
url: '../JSON/recursos.php',
method: 'POST'
}),
reader: new Ext.data.JsonReader({
root: 'data'
}, [
{name: 'valor'},
{name: 'fuente'}
])
});
//Combos extraidos del Formulario
{
xtype:'combo',
labelStyle: 'font-weight:bold;',
fieldLabel:'Organismo',
name:'organismo',
mode: 'remote',
minChars: '1',
selectOnFocus:true,
emptyText:'Organismo Responsable del Proyecto...',
id:'organismo',
triggerAction:'all',
store:organismos,
displayField: 'organismo',
hiddenname: 'organismo',
valueField: 'valor',
allowBlank:false
},
{
xtype:'combo',
labelStyle: 'font-weight:bold;',
fieldLabel:'F. Recursos',
name:'fuente_recursos',
mode: 'remote',
minChars: '1',
selectOnFocus:true,
emptyText:'Fuente de Recuros del Proyecto...',
id:'fuente_recursos',
hiddename:'fuente_recursos',
triggerAction:'all',
store:recursos,
displayField: 'fuente',
valueField: 'valor',
allowBlank:false
}


