1

I am using Laravel Forms package to generate the form elements. I am using Bootstrap Material design library to get the elements shiny.

Library: https://fezvrasta.github.io/bootstrap-material-design/#checkbox

For Checkboxes, I am not able to get the style as required. It displays a normal checkbox without any material design style.

Below is my code in Laravel view.

{!! Form::checkbox('remember', 1, null, ['id'=>'remember', 'class' => 'checkbox']) !!}
{!! Form::label('remember', 'Remember me') !!}

Instead of the above code, if I use the direct HTML code, it works. Below is the code that works as expected.

  <div class="checkbox">
    <label>
      <input name="remember" type="checkbox"> Remember me
    </label>
  </div>

How can I generate the above code using Laravel Forms?

T J
  • 42,762
  • 13
  • 83
  • 138
Purus
  • 5,701
  • 9
  • 50
  • 89

1 Answers1

-1

The styling of the checkbox is on input[type="checkbox"] and not in the checkbox class.

create a css as

.checkbox {}

to style the checkbox.

T J
  • 42,762
  • 13
  • 83
  • 138
Manmeet S. Oberoi
  • 1,082
  • 1
  • 17
  • 29