public function fieldsToHtml($blnForceSubmitted = false, &$blnNavigation = false)
    {
        $strReturn = "";

        if (is_array($this->__defaults) && count($this->__defaults) > 0) {
            $objFields = $this->getCachedFields();
            foreach ($objFields as $objField) {
                $strName = $objField->getName(true); // true strips the [] off a checkbox's name

                if (array_key_exists($strName, $this->__defaults)) {
                    $varValue = $this->__defaults[$strName];

                    $blnDynamic = $objField->isDynamic();
                    if (! $blnDynamic) {
                        /* @var $objParent Base */
                        $objParent = $objField->getMeta("parent", null);
                        if (is_object($objParent)) {
                            $blnDynamic = $objParent->isDynamic();
                        }
                    }

                    if (is_array($varValue)
                        && !array_key_exists($strName . "_dynamic", $this->__defaults)
                        && $blnDynamic
                    ) {
                        $intDynamicCount = 0;
                        if (count($varValue) > 0) {
                            $intDynamicCount = count($varValue) - 1; // convert to zero-based
                        }

                        $this->__defaults[$strName . "_dynamic"] = $intDynamicCount;
                    }

                    $objField->setDefault($varValue);
                }
            }
        }

        $blnDisplayErrors = ($this->isSubmitted()) ? true : $this->getDisplayErrors();
        foreach ($this->__elements as $element) {
            $strReturn .= $element->toHtml($this->isSubmitted($blnForceSubmitted), false, true, $blnDisplayErrors);

            if (get_class($element) == "ValidFormBuilder\\Navigation") {
                $blnNavigation = true;
            }
        }

        return $strReturn;
    }
public function fieldsToHtml($blnForceSubmitted = false, &$blnNavigation = false)
    {
        $strReturn = "";

        if (is_array($this->__defaults) && count($this->__defaults) > 0) {
            $objFields = $this->getCachedFields();
            foreach ($objFields as $objField) {
                $strName = $objField->getName(true); // true strips the [] off a checkbox's name

                if (array_key_exists($strName, $this->__defaults)) {
                    $varValue = $this->__defaults[$strName];

                    $blnDynamic = $objField->isDynamic();
                    if (! $blnDynamic) {
                        /* @var $objParent Base */
                        $objParent = $objField->getMeta("parent", null);
                        if (is_object($objParent)) {
                            $blnDynamic = $objParent->isDynamic();
                        }
                    }

                    if (is_array($varValue)
                        && !array_key_exists($strName . "_dynamic", $this->__defaults)
                        && $blnDynamic
                    ) {
                        $intDynamicCount = 0;
                        if (count($varValue) > 0) {
                            $intDynamicCount = count($varValue) - 1; // convert to zero-based
                        }

                        $this->__defaults[$strName . "_dynamic"] = $intDynamicCount;
                    }

                    $objField->setDefault($varValue);
                }
            }
        }

        $blnDisplayErrors = ($this->isSubmitted()) ? true : $this->getDisplayErrors();
        foreach ($this->__elements as $element) {
            $strReturn .= $element->toHtml($this->isSubmitted($blnForceSubmitted), false, true, $blnDisplayErrors);

            if (get_class($element) == "ValidFormBuilder\\Navigation") {
                $blnNavigation = true;
            }
        }

        return $strReturn;
    }
public function fieldsToHtml ( $ blnForceSubmitted = false , & $ blnNavigation = false ) { $ strReturn = "" ; if ( is_array ( $ this -> __defaults ) && count ( $ this -> __defaults ) > 0 ) { $ objFields = $ this -> getCachedFields ( ) ; foreach ( $ objFields as $ objField ) { $ strName = $ objField -> getName ( true ) ; // true strips the [] off a checkbox's name if ( array_key_exists ( $ strName , $ this -> __defaults ) ) { $ varValue = $ this -> __defaults [ $ strName ] ; $ blnDynamic = $ objField -> isDynamic ( ) ; if ( ! $ blnDynamic ) { /* @var $objParent Base */ $ objParent = $ objField -> getMeta ( "parent" , null ) ; if ( is_object ( $ objParent ) ) { $ blnDynamic = $ objParent -> isDynamic ( ) ; } } if ( is_array ( $ varValue ) && ! array_key_exists ( $ strName . "_dynamic" , $ this -> __defaults ) && $ blnDynamic ) { $ intDynamicCount = 0 ; if ( count ( $ varValue ) > 0 ) { $ intDynamicCount = count ( $ varValue ) - 1 ; // convert to zero-based } $ this -> __defaults [ $ strName . "_dynamic" ] = $ intDynamicCount ; } $ objField -> setDefault ( $ varValue ) ; } } } $ blnDisplayErrors = ( $ this -> isSubmitted ( ) ) ? true : $ this -> getDisplayErrors ( ) ; foreach ( $ this -> __elements as $ element ) { $ strReturn .= $ element -> toHtml ( $ this -> isSubmitted ( $ blnForceSubmitted ) , false , true , $ blnDisplayErrors ) ; if ( get_class ( $ element ) == "ValidFormBuilder\\Navigation" ) { $ blnNavigation = true ; } } return $ strReturn ; }
This method generates HTML output for the current internal elements collection.

This method is mostly used internally in the library and it's therefore not recommended to use this except
for these rare occasions when you only want the rendered fields an not all the meta surrounding the fields
like the form tag, description element and form error message.

@param bool $blnForceSubmitted This forces the form rendering as if the fields are submitted
@param bool $blnNavigation This is a reference returning true if the form contains a navigation element
@return string Generated HTML output
This method generates HTML output for the current internal elements collection .