PDA

View Full Version : BasicForm.reset() don't mark form field as valid, why?



Payoffice
28 Dec 2012, 9:24 AM
Hi,

I create a from with several fields, this form contains a button that allows users to clear all fields. To do this I use reset function. I notice that when I call reset, fields that was mark as invalid remain invalid? Why and how can I reset form fields in order to achieve my goal?

Regards,

P.

Payoffice
28 Dec 2012, 11:14 AM
No idea?

P.

willigogs
28 Dec 2012, 11:33 AM
Could you post your code as an example?

IIRC, resetting a form should also reset the validation (unless a submit has been successful, then invalidates the second time, etc).

Alternatively you could try basicForm's clearInvalid() method:
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.BasicForm-method-clearInvalid

wm003
8 Jan 2013, 3:38 AM
Do the fields have "allowBlank:false" ?

Payoffice
8 Jan 2013, 4:37 AM
Yes he did.

P.