I am trying to pass some values as parameters to a rest service. I have entered some value in the form but when I am trying to get the values. I am getting the empty values. attached is the code for reference. This is the view code:
Ext.define('app.view.contact', {
extend: 'Ext.form.Panel',
xtype: 'contact1',
id: 'contactForm',
config: {
and the controller code is :
Ext.define('app.controller.mainController', {
extend: 'Ext.app.Controller',
views: ['Viewport','home', 'contact'],
//models:['mainModel'], if you wanted to load a model
//stores: ['mainStore'], if you wanted to load a store
refs: [
{
ref: 'contactForm',
selector: '#contactForm'
}
],
init: function() {
console.log('mainController:init');
Hi,
I am using Sencha Touch 2.0.
I have a form with two fields name and password. If I am giving the default values for the fields as shown, I am getting the values for name and password through form.getValues().name and form.getValues().password
{
xtype: 'textfield',
id:'name',
name:'name',
label: 'Name',
required: true,
value:'ABC',
},{
xtype: 'emailfield',
name:'password',
id:'password',
label: 'Email',
required: true,
value:'password',
}
but if I am entering some data into the form and want to get the value of data entered I am getting blank when I print form.getValues().name and form.getValues().password. Can you please let me know what I am doing wrong so that I am not getting the value of information entered.