emi_sastra
asked on
Put button at the same row with other control.
Hi All,
I have below display.
Please have a look at the image.
Is there possible to put the button at the same row with the data filter (drop down) ?
Thank you.
Arrange-Display.PNG
I have below display.
Please have a look at the image.
Is there possible to put the button at the same row with the data filter (drop down) ?
Thank you.
Arrange-Display.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Zakaria,
This my code, where to change?
Thank you.
This my code, where to change?
{{ html()->modelForm($filters, 'POST')->acceptsFiles()->class('')->open() }}
@php
//dump($filters)
$bulans = [
'01' => 'Januari',
'02' => 'Februari',
'03' => 'Maret',
'04' => 'April',
'05' => 'Mei',
'06' => 'Juni',
'07' => 'Juli',
'08' => 'Agustus',
'09' => 'September',
'10' => 'Oktober',
'11' => 'November',
'12' => 'Desember',
];
$tahuns = [];
foreach(range(date('Y'), date('Y') - 5) as $thn){
$tahuns[$thn] = $thn;
}
@endphp
<a data-toggle="collapse" href="#filterForm" role="button" aria-expanded="true" aria-controls="filterForm">
Filter: @if (count($filters) > 0)
<span class="badge badge-pill badge-success">{{ count($filters) }}</span>
@endif
</a>
<div class="collapse show collapse-form" id="filterForm">
<div class=" card card-body">
<div class="row">
@if(isset($filters['bulan']))
<div class="form-group col-sm-3 col-md-2">
{{ html()->label('Bulan')->class('form-control-label')->for('bulan') }}
{{ html()->select('bulan', $bulans)
->class('form-control') }}
</div>
@endif
<div class="form-group col-sm-3 col-md-2">
{{ html()->label('Tahun')->class('form-control-label')->for('tahun') }}
{{ html()->select('tahun', $tahuns)
->class('form-control') }}
</div>
</div>
<div class="row">
<div class="col text-right">
{{-- <input class="btn btn-xs btn-default" type="submit" name="clear" value="Hapus Filter"> --}}
<button class="btn btn-xs btn-primary">Filter</button>
</div>
</div>
</div>
</div>
{{ html()->closeModelForm() }}
Thank you.
ASKER
I try this.
The filter at the label row not at the drop down row. why ?
Thank you.
<div class="collapse show collapse-form" id="filterForm">
<div class=" card card-body">
<div class="row">
@if(isset($filters['bulan']))
<div class="form-group col-sm-3 col-md-2">
{{ html()->label('Bulan')->class('form-control-label')->for('bulan') }}
{{ html()->select('bulan', $bulans)
->class('form-control') }}
</div>
@endif
<div class="form-group col-sm-3 col-md-2">
{{ html()->label('Tahun')->class('form-control-label')->for('tahun') }}
{{ html()->select('tahun', $tahuns)
->class('form-control') }}
</div>
<div class="col text-right">
<label class="col-form-label"> </label>
{{-- <input class="btn btn-xs btn-default" type="submit" name="clear" value="Hapus Filter"> --}}
<button class="btn btn-xs btn-primary">Filter</button>
</div>
</div>
</div>
</div>
The filter at the label row not at the drop down row. why ?
Thank you.
ASKER
I add offset-md-7 and it works great.
Thank you.
<div class="offset-md-7"></div>
<div class="col text-right">
<label class="col-form-label"> </label>
{{-- <input class="btn btn-xs btn-default" type="submit" name="clear" value="Hapus Filter"> --}}
<button class="btn btn-xs btn-primary">Filter</button>
</div>
Thank you.
ASKER
Hi Zakaria,
Thank you very much for your help.
Thank you very much for your help.
Hi Emi, You're welcome, Glad I could help.
ASKER
Thank you.