former icon indicating copy to clipboard operation
former copied to clipboard

How to style checkboxes

Open bschooly opened this issue 4 years ago • 5 comments

Specifically how to get a space between checkbox and label?

bschooly avatar Jul 23 '20 14:07 bschooly

Hi @bschooly - I'm sorry the checkbox isn't rendering correctly. Former's job is to output the correct Bootstrap (or other framework) HTML, and it's the framework's job to style the elements.

If your checkbox isn't being styled correctly, please double-check that you have selected your correct framework in Former's config/former.php config file. If it's still rendering incorrectly, please post to this ticket:

  1. What version of Former you are using and what framework you have selected in config/former.php
  2. What version of Bootstrap (or another framework) you are using
  3. The Former code you are using to generate the checkbox (Former::checkbox('foo'), for example)
  4. The HTML output that is being generated by Former.
  5. A screenshot of the checkbox that is not being rendered correctly.

claar avatar Jul 23 '20 14:07 claar

Wow thanks for quick response.

  1. The changelog file newest entry says 4.0.0. Somewhere else to look.
  2. Bootstrap 4.5.0
  3. {!! Former::checkboxes('Options')->checkboxes($options['items'])->check($options['selected'])!!}

Capture

bschooly avatar Jul 23 '20 15:07 bschooly

Well actually still had framework set to bootstrap3. Changing to 4 results in error. Do I need the latest former?

bschooly avatar Jul 23 '20 15:07 bschooly

Hi @bschooly - what error are you seeing? You can find out what version of Former you are using by looking in your composer.lock file -- you should see something like:

             "name": "anahkiasen/former",
             "version": "4.4.0",

Support for Bootstrap 4 was added in October 2018 in Former version 4.1.8, so you will have to be on that version or higher.

claar avatar Jul 23 '20 18:07 claar

4.0.5 so I've got upgrade and that in turn will probably mean upgrading laravel as I'm way behind on it for my application.

bschooly avatar Jul 23 '20 18:07 bschooly

Closing this issue because it is quite old and it has been a long time since there was any activity, if there is still a problem please open a new issue.

stayallive avatar Mar 22 '24 11:03 stayallive