CakePHP-Bootstrap / cakephp3-bootstrap-helpers

CakePHP 3.x Helpers for Bootstrap 3 and 4.
https://holt59.github.io/cakephp3-bootstrap-helpers/
MIT License
130 stars 79 forks source link

horizontal form #99

Closed siran closed 7 years ago

siran commented 7 years ago

When setting a horizontal form, there is no way NOT to use the .row class in inputContainer. It would be nice if $this->_setDefaultTemplates () ; could have an option to avoid the 'inputContainer' => str_replace('form-group', 'form-group row', $this->templates('inputContainer')) line.

Maybe using the inline option?

    if ($this->inline) {
        $this->templates([
            'label' => str_replace('{{attrs.class}}', 'sr-only {{attrs.class}}', $this->templates('label')),
            'inputContainer' => str_replace('form-group row', 'form-group', $this->templates('inputContainer')).' ',
        ]) ;
    }
siran commented 7 years ago

not necessary. fixed by enclosing form in a div.