formers / former

A powerful form builder, for Laravel and other frameworks (stand-alone too)
https://formers.github.io/former/
1.34k stars 205 forks source link

Adding support for Bootstrap 4 #577

Closed bdewong closed 6 years ago

bdewong commented 6 years ago

This adds pretty basic support for Bootstrap 4. Needed minor changes to the checkable trait to be able to support the way that Boostrap 4 renders the radio and checkbox fields.

Example Radio call:

    {!! Former::radios('type')
        ->radios([
            'Option 1' => [
                'name' => 'type',
                'value' => 'o1',
                'class' => 'form-check-input'
            ],
            'Option 2' => [
                'name' => 'type',
                'value' => 'o2',
                'class' => 'form-check-input'
            ]
        ])->inline();
    !!}
claar commented 6 years ago

Wow! Thanks so much @bdewong!

This looks fantastic. Would you be willing to copy TwitterBootstrap3Test.php to TwitterBootstrap4Test.php and update the tests to pass?

bdewong commented 6 years ago

Sorry, I created them online to get started. I've gone ahead and updated them and they are now passing.