protected function getDynamicHtml($intCount = 0)
    {
        $strReturn = "";

        if ($this->__dynamic && ! empty($this->__dynamicLabel)) {
            $arrFields = array();
            // Generate an array of field id's
            foreach ($this->__fields as $field) {
                switch (get_class($field)) {
                    case "ValidFormBuilder\\MultiField":
                        /* @var $subField Element */
                        foreach ($field->getFields() as $subField) {
                            // Skip the hidden dynamic counter fields.
                            if ((get_class($subField) == "ValidFormBuilder\\Hidden") && $subField->isDynamicCounter()) {
                                continue;
                            }

                            if (!empty($field->getName())) {
                                $arrFields[$subField->getId()] = $subField->getName();
                            }
                        }

                        break;
                    default:
                        // Skip the hidden dynamic counter fields.
                        if ((get_class($field) == "ValidFormBuilder\\Hidden") && $field->isDynamicCounter()) {
                            continue;
                        }

                        if (!empty($field->getName())) {
                            $arrFields[$field->getId()] = $field->getName();
                        }

                        break;
                }
            }

            //*** Store the active area's checkbox in the dynamic fields array as well
            $areaName = ($intCount == 0) ? $this->getName() : $this->getName() . "_" . $intCount;
            if ($this->__active) {
                $arrFields[$areaName] = $areaName;
            }

            $strReturn .= "<div class=\"vf__dynamic\"{$this->getDynamicButtonMeta()}>";
            $strReturn .= "<a href=\"#\" data-target-id=\"" . implode("|", array_keys(array_filter($arrFields)))
                . "\" data-target-name=\"" . implode("|", array_values(array_filter($arrFields)))
                . "\"{$this->__getDynamicLabelMetaString()}>{$this->__dynamicLabel}</a>";
            $strReturn .= "</div>";
        }

        return $strReturn;
    }
protected function getDynamicHtml($intCount = 0)
    {
        $strReturn = "";

        if ($this->__dynamic && ! empty($this->__dynamicLabel)) {
            $arrFields = array();
            // Generate an array of field id's
            foreach ($this->__fields as $field) {
                switch (get_class($field)) {
                    case "ValidFormBuilder\\MultiField":
                        /* @var $subField Element */
                        foreach ($field->getFields() as $subField) {
                            // Skip the hidden dynamic counter fields.
                            if ((get_class($subField) == "ValidFormBuilder\\Hidden") && $subField->isDynamicCounter()) {
                                continue;
                            }

                            if (!empty($field->getName())) {
                                $arrFields[$subField->getId()] = $subField->getName();
                            }
                        }

                        break;
                    default:
                        // Skip the hidden dynamic counter fields.
                        if ((get_class($field) == "ValidFormBuilder\\Hidden") && $field->isDynamicCounter()) {
                            continue;
                        }

                        if (!empty($field->getName())) {
                            $arrFields[$field->getId()] = $field->getName();
                        }

                        break;
                }
            }

            //*** Store the active area's checkbox in the dynamic fields array as well
            $areaName = ($intCount == 0) ? $this->getName() : $this->getName() . "_" . $intCount;
            if ($this->__active) {
                $arrFields[$areaName] = $areaName;
            }

            $strReturn .= "<div class=\"vf__dynamic\"{$this->getDynamicButtonMeta()}>";
            $strReturn .= "<a href=\"#\" data-target-id=\"" . implode("|", array_keys(array_filter($arrFields)))
                . "\" data-target-name=\"" . implode("|", array_values(array_filter($arrFields)))
                . "\"{$this->__getDynamicLabelMetaString()}>{$this->__dynamicLabel}</a>";
            $strReturn .= "</div>";
        }

        return $strReturn;
    }
protected function getDynamicHtml ( $ intCount = 0 ) { $ strReturn = "" ; if ( $ this -> __dynamic && ! empty ( $ this -> __dynamicLabel ) ) { $ arrFields = array ( ) ; // Generate an array of field id's foreach ( $ this -> __fields as $ field ) { switch ( get_class ( $ field ) ) { case "ValidFormBuilder\\MultiField" : /* @var $subField Element */ foreach ( $ field -> getFields ( ) as $ subField ) { // Skip the hidden dynamic counter fields. if ( ( get_class ( $ subField ) == "ValidFormBuilder\\Hidden" ) && $ subField -> isDynamicCounter ( ) ) { continue ; } if ( ! empty ( $ field -> getName ( ) ) ) { $ arrFields [ $ subField -> getId ( ) ] = $ subField -> getName ( ) ; } } break ; default : // Skip the hidden dynamic counter fields. if ( ( get_class ( $ field ) == "ValidFormBuilder\\Hidden" ) && $ field -> isDynamicCounter ( ) ) { continue ; } if ( ! empty ( $ field -> getName ( ) ) ) { $ arrFields [ $ field -> getId ( ) ] = $ field -> getName ( ) ; } break ; } } //*** Store the active area's checkbox in the dynamic fields array as well $ areaName = ( $ intCount == 0 ) ? $ this -> getName ( ) : $ this -> getName ( ) . "_" . $ intCount ; if ( $ this -> __active ) { $ arrFields [ $ areaName ] = $ areaName ; } $ strReturn .= "<div class=\"vf__dynamic\"{$this->getDynamicButtonMeta()}>" ; $ strReturn .= "<a href=\"#\" data-target-id=\"" . implode ( "|" , array_keys ( array_filter ( $ arrFields ) ) ) . "\" data-target-name=\"" . implode ( "|" , array_values ( array_filter ( $ arrFields ) ) ) . "\"{$this->__getDynamicLabelMetaString()}>{$this->__dynamicLabel}</a>" ; $ strReturn .= "</div>" ; } return $ strReturn ; }
Generate extra HTML output to facilitate the dynamic duplication logic
@param int $intCount
@return string
Generate extra HTML output to facilitate the dynamic duplication logic