javascript - Sencha Touch formpanel does not create form element -



javascript - Sencha Touch formpanel does not create form element -

i'm working through of sencha touch getting started code.

one of things i'm trying create contact form tab panel.

i've defined panel class includes formpanel in it. when load page, fieldset gets created formpanel not create form element:

ext.define('scorekeeper.view.tabs.contact',{ extend : 'ext.panel', xtype : 'contacttab', requires: [ 'ext.form.fieldset', 'ext.field.text', 'ext.field.email', 'ext.field.textarea' ], config : { title : 'contact form', id : 'contactform', iconcls : 'user', xtype : 'formpanel', url : 'contact.php', layout : 'vbox', items : [ { xtype : 'fieldset', title : 'contact us', instructions : '(email address optional)', height : 285, items : [ { xtype: 'textfield', label: 'name' },{ xtype: 'emailfield', label: 'email' },{ xtype: 'textareafield', label: 'message' } ] },{ xtype : 'button', text : 'send', name : 'contactsubmit', ui : 'confirm' } ] } });

when inspect code form illustration in the documentation form panel class creates form element. i'm not getting console errors, doesn't created.

what missing?

your syntax not right : utilize config field of panel items field.

you should either

specify scorekeeper.view.tabs.contact extend : 'ext.form.panel' , remove xtype line config

or

specify formpanel object in items of panel, , set fieldset in items of formpanel.

code 1rst solution (best imo) :

ext.define('scorekeeper.view.tabs.contact',{ extend : 'ext.form.panel', xtype : 'contacttab', requires: [ 'ext.form.fieldset', 'ext.field.text', 'ext.field.email', 'ext.field.textarea' ], config : { title : 'contact form', id : 'contactform', iconcls : 'user', // xtype : 'formpanel', ... });

javascript forms sencha-touch-2

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -