-
28 Mar 2012 10:59 PM #1
BUG , Registration Form Bug Ext JS4.0.7
BUG , Registration Form Bug Ext JS4.0.7
hi,
I think this is a bug, and am not sure ,
Please check it
I got the main source code from the docs/index.html#!/example/form/registration.html example's/examples/form/registration.js
What i did is i just changed that single row in to two column the code is given below, I have only one month of extjs Experience, some time it might be my mistake , Please consider this and tell me if it was by my mistake ,
Problem : The problem i found is when the original is executed it was(the fields) was in a single column then the password fields comparison works properly, but when i changed it to two column the comparisons are not working ,
OS : Windows Xp
Ext Version: ExtJS 4.0.7
Server : WampServer Version 2.0
Browser 1 : FireFox 10.0.2 (With fireBug1.9.1)
Reported Error By FireBug [Console] : password1 is null[IMG]chrome://firebug/content/blank.gif[/IMG] return (value === password1.getValue()) ? true : 'Passwords do not match.'
Browser 2 : Google Chrome 17.0.963.83m
Reported Error in the Developer tool : Uncaught TypeError: Cannot call method 'getValue' of null
Sencha admins and developersCode:items:[{ xtype : 'container', anchor : '100%', layout : 'column', items:[{ xtype : 'container', columnWidth :.5, layout : 'anchor', items :[ { xtype: 'textfield', name: 'username', fieldLabel: 'User Name', allowBlank: false, minLength: 6 },{ xtype: 'textfield', name: 'password1', fieldLabel: 'Password', inputType: 'password', style: 'margin-top:15px', allowBlank: false, minLength: 8 },{ xtype: 'checkboxfield', name: 'acceptTerms', fieldLabel: 'Terms of Use', hideLabel: true, style: 'margin-top:15px', boxLabel: 'I have read and accept the <a href="http://www.sencha.com/legal/terms-of-use/" class="terms">Terms of Use</a>.', // Listener to open the Terms of Use page link in a modal window listeners: { click: { element: 'boxLabelEl', fn: function(e) { var target = e.getTarget('.terms'), win; if (target) { win = Ext.widget('window', { title: 'Terms of Use', modal: true, html: '<iframe src="' + target.href + '" width="950" height="500" style="border:0"></iframe>', buttons: [{ text: 'Decline', handler: function() { this.up('window').close(); formPanel.down('[name=acceptTerms]').setValue(false); } }, { text: 'Accept', handler: function() { this.up('window').close(); formPanel.down('[name=acceptTerms]').setValue(true); } }] }); win.show(); e.preventDefault(); } } } }, // Custom validation logic - requires the checkbox to be checked getErrors: function() { return this.getValue() ? [] : ['You must accept the Terms of Use'] } } ] },{ xtype : 'container', columnWidth :.5, layout : 'anchor', items :[ { xtype: 'textfield', name: 'email', fieldLabel: 'Email Address', vtype: 'email', allowBlank: false }, { xtype: 'textfield', style: 'margin-top:15px', name: 'password2', fieldLabel: 'Repeat Password', inputType: 'password', allowBlank: false, validator: function(value) { var password1 = this.previousSibling('[name=password1]'); return (value === password1.getValue()) ? true : 'Passwords do not match.' } } ] } ] }]
Waiting for your reply,
Thank you
123lal
Please note if this is not a bug , admins can delete my post without my permission, but i will be more happy , if you are pointing my mistake , Thank youLast edited by 123lal; 28 Mar 2012 at 11:11 PM. Reason: insert note
-
29 Mar 2012 6:11 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
It's saying this returned null
Code:var password1 = this.previousSibling('[name=password1]');Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote