PDA

View Full Version : the proper way of implementing custom field ...



armandoxxx
28 May 2013, 12:53 AM
Hey
Is there any good tutorial of how to properly implement custom form field ?

I'm creating grid form field. One problem I have is that my isValid method is called all the time. Even though i use validateOnChange : false ...

any help appreciated.

Regards

Armando

dawesi
28 May 2013, 1:59 AM
Start by extending a existing field, or the base field class Ext.form.field.Field

http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.Field

armandoxxx
28 May 2013, 3:23 AM
Well ... I'm beyond that already ..

problem is isValid method .. It's beeing called a lot .. when I'm typing into other fields, so how do I detect if it was called on form submit .. or how do I disable live validation ..

It's confusing looking and other implementations of fields since lots of code is custom ...

Regrads

Armando

armandoxxx
28 May 2013, 7:28 AM
Got it ...

isValid() is called by "live" validation
validate() is called by form submit


Regards

Armando