PDA

View Full Version : [CLOSED] Loop through formfields to check validation



CarWise
May 23, 2013, 2:45 PM
Is there a way to loop though all objects in a formpanel to find out for each object if it's valid or not (client)?

Having some trouble understandig why my form isn't submitted. Probably something to do with some objects not visible, but still validated.

Martin

Daniil
May 23, 2013, 3:45 PM
Hi Martin,

Yes, hidden fields are still validated. A solution - disabling fields along with hiding and, respectively, enabling along with showing.

Disabled fields are not validated, i.e. they are always considered as valid.

Though, answering direct to your question, you can use a container's cascade method.
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.container.AbstractContainer-method-cascade

CarWise
May 24, 2013, 9:08 AM
Solved,

It was a hidden combo .. I disable it now :)

Martin