difficult to explain.
this is the code for the window i called:
// Window
Customers.window.CreateUpdateOrder = function (config) {
config = config || {};
this.ident = config.ident || Ext.id();
//var record = this.getValues();
alert(this.findField("id").getValue());
Ext.applyIf(config, {
width: 500,
closeAction: "close",
url: MODx.config.connector_url,
action: "customer\\processors\\orders\\create",
shadow: true,
fields: [
{
xtype: "modx-tabs",
bodyStyle: { background: "transparent" },
autoHeight: true,
deferredRender: false,
items: [
{
title: "Kunde",
layout: "form",
cls: "modx-panel",
forceLayout: true,
bodyStyle: { background: "transparent", padding: "10px" },
autoHeight: true,
labelWidth: 200,
items: [
{
xtype: "compositefield",
combineErrors: false,
msgTarget: "side",
items: [
{
xtype: "combo",
mode: "local",
triggerAction: "all",
forceSelection: true,
editable: false,
fieldLabel: "PressePass Version",
name: "pass_version",
hiddenName: "pass_version",
displayField: "name",
valueField: "value",
store: new Ext.data.JsonStore({
fields: ["name", "value"],
data: [
{ name: "", value: "" },
{ name: "Standard", value: "standard" },
{ name: "Exekutive", value: "executive" },
{ name: "Premium", value: "premium" },
],
}),
},
{
xtype: "combo",
mode: "local",
value: "mrs",
triggerAction: "all",
forceSelection: true,
editable: false,
fieldLabel: "Anrede",
name: "gender",
hiddenName: "gender",
displayField: "name",
valueField: "value",
store: new Ext.data.JsonStore({
fields: ["name", "value"],
data: [
{ name: "Herr", value: "1" },
{ name: "Frau", value: "2" },
{ name: "Andere", value: "3" },
{ name: "", value: "0" },
],
}),
},
],
},
{
xtype: "textfield",
name: "id",
anchor: "100%",
},
{
xtype: "textfield",
fieldLabel: "Titel",
name: "title",
anchor: "100%",
},
{
xtype: "textfield",
fieldLabel: "Name",
name: "fullname",
anchor: "100%",
},
{
xtype: "textfield",
fieldLabel: "Strasse",
name: "billing_address",
anchor: "100%",
},
{
xtype: "compositefield",
combineErrors: false,
msgTarget: "side",
items: [
{
xtype: "textfield",
fieldLabel: "PLZ",
name: "billing_zip",
width: 55,
},
{
xtype: "textfield",
fieldLabel: "Ort",
name: "billing_city",
width: 310,
},
],
},
{
xtype: "textfield",
fieldLabel: "Land",
name: "billing_country",
anchor: "100%",
},
],
},
{
id: "modx-" + this.ident + "-invoice",
title: "Abweichende RE",
layout: "form",
cls: "modx-panel",
autoHeight: true,
forceLayout: true,
labelWidth: 200,
defaults: { autoHeight: true, border: false },
style: "background: transparent;",
bodyStyle: { background: "transparent", padding: "10px" },
//MODx.getQRSettings(this.ident,config.record)
items: [
{
xtype: "textfield",
fieldLabel: "Firma",
name: "company",
anchor: "100%",
},
{
xtype: "textfield",
fieldLabel: "Straße",
name: "delivery_address",
anchor: "100%",
},
{
xtype: "textfield",
fieldLabel: "PLZ",
name: "delivery_zip",
anchor: "100%",
},
{
xtype: "textfield",
fieldLabel: "Ort",
name: "delivery_city",
anchor: "100%",
},
{
xtype: "textfield",
fieldLabel: "Land",
name: "delivery_country",
anchor: "100%",
},
],
},
{
id: "modx-" + this.ident + "-addons",
title: "Positionen",
layout: "form",
cls: "modx-panel",
autoHeight: true,
forceLayout: true,
labelWidth: 200,
defaults: { autoHeight: true, border: false },
style: "background: transparent;",
bodyStyle: { background: "transparent", padding: "10px" },
//MODx.getQRSettings(this.ident,config.record)
items: [
{
xtype: "customer-grid-positions",
action: "customer\\processors\\orders\\getlistpos",
baseParams: {
// send the product id to your processor,
// or you'll get all images :)
action: "customer\\processors\\orders\\getlistpos",
id: id,
},
},
{
xtype: "textarea",
fieldLabel: "Kommentar",
name: "comment",
anchor: "100%",
},
],
},
],
},
],
});
Customers.window.CreateUpdateOrder.superclass.constructor.call(this, config);
};
Ext.extend(Customers.window.CreateUpdateOrder, MODx.Window);
Ext.reg(
"customer-window-orders-create-update",
Customers.window.CreateUpdateOrder
);
how can I get a field value for example id the use it vor inside call for embeded data grid?
I need the id for getting datagrid values for getlistpos processor.
thank you in advance
bye
Chris
PS: ```
this.findField(“id”).getValue()
doesnt run, findField isnt defined …?