i am implementing project in extjs. i am very new to extjs.
i had created view with two Textfields Question and Option and also created two buttons as ok and cancel.
My view code:
Ext.create('Ext.form.Panel', {
title: 'Question-option',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
xtype: 'textfield',
name: 'Question',
fieldLabel: 'Question',
allowBlank: false // requires a non-empty value
}, {
xtype: 'textfield',
name: 'Option',
fieldLabel: 'Option',
vtype: 'Option' // requires value to be a valid email address format
},
{xtype: 'button', text: 'Ok'},
{xtype: 'button', text: 'Cancel'}
]
});
On ok button click i want to add these textfields data into store.
So can you please suggest me how to write buttonclick event to add all these textfields data into store.
Take this store as example:
You get the form data and then add those data to the store.
Cyaz