1
votes

I have;

{
 xtype: 'fieldset',
 title: 'Actual Minutes Late',
 layout: 'hbox',
 name: 'slappy',
 items: [
  {
   xtype: 'numberfield',
   name: 'fMinutesLate',
   label: 'Minutes Late'
  }
 ]
}

This is sitting within a detailCard.

On the buttons click event, the button is sitting within the the parent fieldset, I want to get the value of the fMinutesLate field.

So far I have tried this within the button;

handler: function (button) {
  var form = button.up('slappy');
  Ext.data.JsonP.request({
    url: 'http://localhost:55427/metrofail.asmx/SubmitFailure',
    callbackKey: 'callback',
    params: {
      LineName : selectedItems[0],
      StationName : selectedItems[1],
      Hour : '',
      Minute : '',
      Meridian : '',
      Delay : ''
    },
    success: function () {  },
    failure: function (a, b) {  },
  });
}
1

1 Answers

1
votes

If the detailCard you speak of extends Ext.data.Form the you can detailCard.getValues() which will return an object of form elements:

{ 
    fMinutesLate: 1234
}

I assume it will go in the "delay" params

delay: detailCard.getValues().fMinutesLate

Should work