public function getFields($blnIncludeMultiFields = false)
    {
        $objFields = new Collection();

        foreach ($this->__elements as $objPage) {
            if ($objPage->hasFields()) {
                foreach ($objPage->getFields() as $objFieldset) {
                    if ($objFieldset->hasFields()) {
                        foreach ($objFieldset->getFields() as $objField) {
                            if (is_object($objField)) {
                                if ($objField->hasFields()) {
                                    // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true.
                                    if (get_class($objField) == "ValidFormBuilder\\MultiField" && $blnIncludeMultiFields) {
                                        $objFields->addObject($objField);
                                    }

                                    foreach ($objField->getFields() as $objSubField) {
                                        if (is_object($objSubField)) {
                                            if ($objSubField->hasFields()) {
                                                // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true.
                                                if (get_class($objField) == "ValidFormBuilder\\MultiField" && $blnIncludeMultiFields) {
                                                    $objFields->addObject($objField);
                                                }

                                                foreach ($objSubField->getFields() as $objSubSubField) {
                                                    if (is_object($objSubSubField)) {
                                                        $objFields->addObject($objSubSubField);
                                                    }
                                                }
                                            } else {
                                                $objFields->addObject($objSubField);
                                            }
                                        }
                                    }
                                } else {
                                    $objFields->addObject($objField);
                                }
                            }
                        }
                    } else {
                        $objFields->addObject($objFieldset);
                    }
                }
            } else {
                $objFields->addObject($objPage);
            }
        }

        return $objFields;
    }