Valdating hidden fields

I have a form with ‘text’ components that are visible and some that are in an “Accordion” that is optional for the user to enter. But I need to validate all the fields. If the user has not opened the accordion item, the validate routine throws an error at line 6874:

_clear_invalid:function(id,obj){
dhx.html.removeCss(this.elements[id]._dataobj.firstChild, “invalid”);
}

In my form, the occurs on a “combo” component has not been displayed in the Accordion tab. The combo does not have a firstChild node yet.

I was not sure what the best correction for this but one idea is to change _clear_invalid and _mark_invalid to this:

_mark_invalid:function(id,obj){
this._clear_invalid(id,obj);
dhx.html.addCss(this.elements[id]._dataobj.firstChild ?
this.elements[id]._dataobj.firstChild :
this.elements[id]._dataobj, “invalid”);
},
_clear_invalid:function(id,obj){
dhx.html.removeCss(this.elements[id]._dataobj.firstChild ?
this.elements[id]._dataobj.firstChild :
this.elements[id]._dataobj, “invalid”);
}

Thanks,
Kris

Hi Kris,

the solution for the problem will be included into the next version.