Tom Posted July 31, 2011 Share 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 Link to comment Share on other sites More sharing options...
dionel1969 Posted August 1, 2011 Share Posted August 1, 2011 Thank you. I'll remeber it. Quote Link to comment Share on other sites More sharing options...
Javi Posted November 30, 2011 Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 1, 2011 Administrators Share 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 Link to comment Share on other sites More sharing options...
gm3h Posted December 2, 2011 Share 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 Link to comment Share on other sites More sharing options...
dionel1969 Posted December 2, 2011 Share 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 Link to comment Share on other sites More sharing options...
Sebastiao Purcini Posted November 9, 2017 Share Posted November 9, 2017 Very good man. How can I validate the fields in the "onclick" event of the button ? Tks! Quote Link to comment Share on other sites More sharing options...
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.