src/Output.php
private function buildHiddenFields()
    {
        $this->debug->groupCollapsed(__METHOD__);
        $cfg = $this->form->cfg;
        $printOpts = &$cfg['output'];
        $hiddenFields = '';
        if ($printOpts['inputKey']) {   //  && $cfg['persist_method'] != 'none'
            $hiddenFields .= '<input type="hidden" name="_key_" value="'.\htmlspecialchars($this->keyValue).'" />';
        }
        if (\strtolower($cfg['attribs']['method']) == 'get') {
            $this->debug->warn('get method');
            $urlParts = \parse_url(\html_entity_decode($cfg['attribs']['action']));
            // $attribs['action'] = $urlParts['path'];
            if (!empty($urlParts['query'])) {
                \parse_str($urlParts['query'], $params);
                $fieldNames = array();
                foreach ($this->form->currentFields as $field) {
                    $fieldNames[] = $field->attribs['name'];
                }
                foreach ($params as $k => $v) {
                    if (\in_array($k, $fieldNames)) {
                        continue;
                    }
                    $hiddenFields .= '<input type="hidden" name="'.\htmlspecialchars($k).'" value="'.\htmlspecialchars($v).'" />'."\n";
                }
            }
        }
        $this->debug->log('hiddenFields', $hiddenFields);
        $this->debug->groupEnd();
        return $hiddenFields;
    }
private function buildHiddenFields()
    {
        $this->debug->groupCollapsed(__METHOD__);
        $cfg = $this->form->cfg;
        $printOpts = &$cfg['output'];
        $hiddenFields = '';
        if ($printOpts['inputKey']) {   //  && $cfg['persist_method'] != 'none'
            $hiddenFields .= '<input type="hidden" name="_key_" value="'.\htmlspecialchars($this->keyValue).'" />';
        }
        if (\strtolower($cfg['attribs']['method']) == 'get') {
            $this->debug->warn('get method');
            $urlParts = \parse_url(\html_entity_decode($cfg['attribs']['action']));
            // $attribs['action'] = $urlParts['path'];
            if (!empty($urlParts['query'])) {
                \parse_str($urlParts['query'], $params);
                $fieldNames = array();
                foreach ($this->form->currentFields as $field) {
                    $fieldNames[] = $field->attribs['name'];
                }
                foreach ($params as $k => $v) {
                    if (\in_array($k, $fieldNames)) {
                        continue;
                    }
                    $hiddenFields .= '<input type="hidden" name="'.\htmlspecialchars($k).'" value="'.\htmlspecialchars($v).'" />'."\n";
                }
            }
        }
        $this->debug->log('hiddenFields', $hiddenFields);
        $this->debug->groupEnd();
        return $hiddenFields;
    }
private function buildHiddenFields ( ) { $ this -> debug -> groupCollapsed ( __METHOD__ ) ; $ cfg = $ this -> form -> cfg ; $ printOpts = & $ cfg [ 'output' ] ; $ hiddenFields = '' ; if ( $ printOpts [ 'inputKey' ] ) { //  && $cfg['persist_method'] != 'none' $ hiddenFields .= '<input type="hidden" name="_key_" value="' . \ htmlspecialchars ( $ this -> keyValue ) . '" />' ; } if ( \ strtolower ( $ cfg [ 'attribs' ] [ 'method' ] ) == 'get' ) { $ this -> debug -> warn ( 'get method' ) ; $ urlParts = \ parse_url ( \ html_entity_decode ( $ cfg [ 'attribs' ] [ 'action' ] ) ) ; // $attribs['action'] = $urlParts['path']; if ( ! empty ( $ urlParts [ 'query' ] ) ) { \ parse_str ( $ urlParts [ 'query' ] , $ params ) ; $ fieldNames = array ( ) ; foreach ( $ this -> form -> currentFields as $ field ) { $ fieldNames [ ] = $ field -> attribs [ 'name' ] ; } foreach ( $ params as $ k => $ v ) { if ( \ in_array ( $ k , $ fieldNames ) ) { continue ; } $ hiddenFields .= '<input type="hidden" name="' . \ htmlspecialchars ( $ k ) . '" value="' . \ htmlspecialchars ( $ v ) . '" />' . "\n" ; } } } $ this -> debug -> log ( 'hiddenFields' , $ hiddenFields ) ; $ this -> debug -> groupEnd ( ) ; return $ hiddenFields ; }
Generate hidden fields not related to inputs

@return string
Generate hidden fields not related to inputs