dimanche 24 novembre 2019

Create a toggle button with laravelcollective/html

I would like to make a checkbox input using toggle button.

The toggle has On/Off options. I would like to use laravelcollective to create this input, but I didnt find any reference regarding this.

My target output should looks like this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />

<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet" />
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>

<div class="checkbox">
  <label>
    <input type="checkbox" data-toggle="toggle">
  </label>
</div>
<input type="checkbox" checked data-toggle="toggle">

My current form:

    <div class="form-group">
        {!! Form::label('is_holiday', 'Holiday Mode:') !!}
        {!! Form::checkbox('is_holiday', array(1 => 'On', 0 => 'Off'),null, ['class'=>'form-control']) !!}
    </div>


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2QQNfd9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire