Hello friends.

I wanted to figure out how to access the error object within the HTML_QuickForm framework to identify the elements that have undergone a failure under the added rules after the form is transferred back from the server after submission, Either from the DRUPAL-PHP or the SMARTY-JAVASCRIPT framework.

Also as to where in DRUPAL ( drupal file / method ) could I get the correct access to this element in order to process it to identify the failed elements. I have tried using this in the buildquickform method invoked under the schema of any 'form'.php file under the control flow of the form->validate condition which triggers when the form is submitted and flow goes to the server. It doesnot seem to return the elements that have failed

My search has lead me to these findings ::

We have an element/group called 'errors' which is implictly added to the final HTML by QuickForm .
It is of the type HTML_QuickForm_Error and extends the PEAR_Error defined under the PEAR.php file.
I can predict that this element is of the type array just as the buttons group added under the drupal framework and has indexes to several error messages provided by HTML_quickform.
Any associated template structure includes a code which checks the count of the number of indexes in the 'errors' element before displaying the errors .

These errors are displayed independently of the associated element by including the type element
just above the element when returning the form after validation has been performed.

I have two ways now to access information about the failed elements :-
Either through the 'errors' element/group or by scanning the final HTML on re-submission from server to figure out the span elements having the class type : 'crm-error' .

Also I would like to know if these span types are added by HTML_QuickForm or by DRUPAL .
As it is quite unclear as to where from, the HTML_Quickform would access the CSS associated with the definition of the class 'crm-error' where crm is a DRUPAL associated term .