-
14 Jul 2008 12:40 PM #1
User Signup form
User Signup form
I have a signup form built in Ext 2.1 and I want to verify both password fields match before submittal how would I go about doing this, I can do it after the submit, however I would like my form to be as interactive as it can be before moving on.
Code:var regiPanel = new Ext.FormPanel ({ ... }), new Ext.form.FieldSet({ title: 'Account Information', autoHeight: true, items: [{ layout:'column', items:[{ columnWidth: 1, layout: 'form', items: [{ xtype: 'textfield', fieldLabel: 'Username', name: 'user1', allowBlank: false, anchor: '97.6%' }] },{ columnWidth: .5, layout: 'form', items: [{ xtype: 'textfield', fieldLabel: 'Email Address', allowBlank: false, name: 'email', vtype: 'email', anchor: '95%' }] },{ columnWidth: .5, layout: 'form', items: [{ xtype: 'textfield', fieldLabel: 'Confirm Email Address', name: 'email2', allowBlank: false, vtype: 'email', anchor: '95%' }] },{ columnWidth: .5, layout: 'form', items: [{ xtype: 'textfield', fieldLabel: 'Password', name: 'auth1', allowBlank: false, anchor: '95%' }] },{ columnWidth: .5, layout: 'form', items: [{ xtype: 'textfield', fieldLabel: 'Confirm Password', allowBlank: false, name: 'auth2', anchor: '95%' }] }] }] })], buttons: [{ text: 'Reset', handler: function() { regiPanel.getForm().reset(); } },{ text: 'Submit', formBind: true }] });
-
14 Jul 2008 1:08 PM #2
-
15 Jul 2008 8:53 AM #3
That was perfect, now you (or anyone else for that manner) wouldn't know how to do a lookup of username lookups with php/mysql back end and dynamically with Ext?
user puts in a desired username in my Ext Form, when the user goes to the next feild the form checks to make sure that username has not already been used. Perhaps even hide the rest of the fields and make the fields active when a successful username has been chosen.
Code:}), new Ext.form.FieldSet({ title: 'Account Information', autoHeight: true, items: [{ layout:'column', items:[{ columnWidth: 1, layout: 'form', items: [{ xtype: 'textfield', fieldLabel: 'Username', name: 'user1', allowBlank: false, anchor: '97.6%' }] },{ columnWidth: 1, layout: 'form', defaultType: 'textfield', items: [{ fieldLabel: 'Email Address', allowBlank: false, name: 'email', id: 'email', vtype: 'email', anchor: '97.6%' }] },{ columnWidth: .5, layout: 'form', defaultType: 'textfield', items: [{ inputType: 'password', fieldLabel: 'Password', name: 'pass', allowBlank: false, anchor: '95%', id: 'pass' }] },{ columnWidth: .5, layout: 'form', defaultType: 'textfield', items: [{ inputType: 'password', fieldLabel: 'Confirm Password', name: 'pass-cfrm', allowBlank: false, anchor: '95%', vtype: 'password', initialPassField: 'pass' }] }]
-
15 Jul 2008 9:11 AM #4
Again, it's already in the demos. Also check out www.extjs.eu, Saki has a field validation plugin there as well.
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
15 Jul 2008 9:12 AM #5
Thank you, I am in the demo's and I am running through it, however not having any luck locating it in the forms section of the examples, I will still plug away in there... and thank you for the link!!!!
-
15 Jul 2008 9:19 AM #6
I think I was thinking of http://localhost/ext/v2.0/examples/form/xml-form.html which only does it on submit. Seems like you'd just need to listen to the blur event and bind it to a handler that submits that field to the server. Anyway, Saki has a plugin, I haven't used it, but maybe it does something similar to what I've described I don't know.
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
15 Jul 2008 9:20 AM #7
Thanks your the best! I am checking out Saki plugin's now... great stuff!!!




Reply With Quote