src/Services/FormMaker.php
private function buildBootstrapColumnForm($formBuild, $columns)
    {
        $newFormBuild = [];
        $formChunks = array_chunk($formBuild, $columns);
        $class = 'col-md-'.(12 / $columns);

        foreach ($formChunks as $chunk) {
            $newFormBuild[] = '<div class="row">';
            foreach ($chunk as $element) {
                $newFormBuild[] = '<div class="'.$class.'">';
                $newFormBuild[] = $element;
                $newFormBuild[] = '</div>';
            }
            $newFormBuild[] = '</div>';
        }

        return implode("", $newFormBuild);
    }
private function buildBootstrapColumnForm($formBuild, $columns)
    {
        $newFormBuild = [];
        $formChunks = array_chunk($formBuild, $columns);
        $class = 'col-md-'.(12 / $columns);

        foreach ($formChunks as $chunk) {
            $newFormBuild[] = '<div class="row">';
            foreach ($chunk as $element) {
                $newFormBuild[] = '<div class="'.$class.'">';
                $newFormBuild[] = $element;
                $newFormBuild[] = '</div>';
            }
            $newFormBuild[] = '</div>';
        }

        return implode("", $newFormBuild);
    }
private function buildBootstrapColumnForm ( $ formBuild , $ columns ) { $ newFormBuild = [ ] ; $ formChunks = array_chunk ( $ formBuild , $ columns ) ; $ class = 'col-md-' . ( 12 / $ columns ) ; foreach ( $ formChunks as $ chunk ) { $ newFormBuild [ ] = '<div class="row">' ; foreach ( $ chunk as $ element ) { $ newFormBuild [ ] = '<div class="' . $ class . '">' ; $ newFormBuild [ ] = $ element ; $ newFormBuild [ ] = '</div>' ; } $ newFormBuild [ ] = '</div>' ; } return implode ( "" , $ newFormBuild ) ; }
Build a two column form using standard bootstrap classes

@param  array $formBuild
@return string
Build a two column form using standard bootstrap classes