View Full Version : Form iterating fields how to get to know the required fields

31 Jul 2012, 7:43 AM
I am having a form panel with no model data up till now. I want to process the form and detect possible mistakes and want to know if all required fields are filled in.
In the API documentation I can see the property Ext.field.Field.required but how to navigate in the object model to it? I googled a lot but I couldn't find it.

I have created a routine to process the form. And I want to use the property required.

This is my trial code:
var oform = Ext.getCmp ('personaliaform'); // form is okay
var ofields = oform.getFieldsArray (); // also filled
var i=0;
var chtml= "";
// getname () is okay but how to get to the required property???
Ext.each ( ofields, function (ofield) {
chtml += "i "+ i + " " + ofield.getName () + "<br>" ;
}, this);


31 Jul 2012, 8:15 AM

1 Aug 2012, 6:15 AM
Short reply but this was indeed the solution. Now I have a related question see


How do I get the value of the input form fields. Which must be simple to tackle you should say....