src/FormView.php
public function getSectionFields($section, $flatten = true)
    {
        if ($flatten === false) {
            $fields = $this->fields;
        } else {
            $fields = $this->getFlattenedFields();
        }

        $matchedFields = array();
        foreach ($fields as $fieldName => $field) {
            if (isset($field['options']['section']) && $field['options']['section'] == $section) {
                $matchedFields[$fieldName] = $field;
            }
        }

        return $matchedFields;
    }
public function getSectionFields($section, $flatten = true)
    {
        if ($flatten === false) {
            $fields = $this->fields;
        } else {
            $fields = $this->getFlattenedFields();
        }

        $matchedFields = array();
        foreach ($fields as $fieldName => $field) {
            if (isset($field['options']['section']) && $field['options']['section'] == $section) {
                $matchedFields[$fieldName] = $field;
            }
        }

        return $matchedFields;
    }
public function getSectionFields ( $ section , $ flatten = true ) { if ( $ flatten === false ) { $ fields = $ this -> fields ; } else { $ fields = $ this -> getFlattenedFields ( ) ; } $ matchedFields = array ( ) ; foreach ( $ fields as $ fieldName => $ field ) { if ( isset ( $ field [ 'options' ] [ 'section' ] ) && $ field [ 'options' ] [ 'section' ] == $ section ) { $ matchedFields [ $ fieldName ] = $ field ; } } return $ matchedFields ; }
Get fields for a certain section

@param $section
@param bool $flatten
@return array
Get fields for a certain section