View Full Version : Change event that enables a text field.

05-01-2012, 03:43 PM

I am relatively new programmer and was wondering if I anyone could help me figure this out. I am using Sencha touch 2 and I want to enable a text field after a selection is made in my select field. I wanted to accomplish this by using a listener, but I am not entirely sure how I would go about doing so.

In the following code, I used a listener to open up a message box, so I see how the listener functions, but I am not sure how I would go about replacing that Msg box with a text field.

label: 'Do you take recreational drugs?',
labelWidth: 600,

{text:'no', value: 'no'},
{text:'yes', value: 'yes'},
{text:'N/A', value: 'na'},

listeners: {
change: function (select, newValue, oldValue) {
Ext.Msg.alert('change', newValue.data.value);

Any help with this situation would be very appreciated.