Tom Posted July 31, 2011 Posted July 31, 2011 Hi everybody, here you ll find a cool feature how easy you can integrate form validation in ExtJs (see screenshot above). Its a little bit similar to c# validations components. How it works: 1) Insert the following code in MainForm.Scripts property: Ext.QuickTips.init(); 2) Assign the client-side event "onafterrender" to any form element you wish validation for and add the following code to enable the validation feautre: ClientEvent.ExtEvents -> onAfterrender sender.allowBlank = false; 3) here you are... all fields with allowBlank = false will turn into red an will show an QuickTip as far as the user dont enter required text. hope it ll improve user experience of your app! Quote
Javi Posted November 30, 2011 Posted November 30, 2011 Hi Farshad With version 0.86, was displayed correctly. Now with version 0.87.0 build 907, the QuickTips are displayed wrong. thanks ------------------------------------------------------- Hi Farjasdf Con la version 0.86, se visualizaba correctamente. Ahora con la versión 0.87.0 build 907, los QuickTips se visualizan mal. Gracias Javi Quote
Administrators Farshad Mohajeri Posted December 1, 2011 Administrators Posted December 1, 2011 With version 0.86, was displayed correctly. Now with version 0.87.0 build 907, the QuickTips are displayed wrong. You mean Hint property? Quote
gm3h Posted December 2, 2011 Posted December 2, 2011 Just FYI: To reset the validation status of every field in the form, you can use this: UniSession.AddJS(Self.WebForm.ExtForm.JSName+'.form.reset()'); Quote
dionel1969 Posted December 2, 2011 Posted December 2, 2011 I don't know why, but I was using this feature today and there was an error all the time. I cancel it caused by speed of upload a beta release to my own server. So, later I will try to use again and I will ask about it. Quote
Sebastiao Purcini Posted November 9, 2017 Posted November 9, 2017 Very good man. How can I validate the fields in the "onclick" event of the button ? Tks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.