@php ($attributes = (isset($value['attributes']) ? $value['attributes'] : [])) @php ($attributes['id'] = (isset($attributes['id']) ? $attributes['id'] : $key)) @php ($attributes['class'] = (isset($attributes['class']) ? $attributes['class'] : 'form-control form-control-lg')) @php ($attributes['class'] .= ($errors->has($key) ? ' is-invalid' : '')) @php ($floatOff = ['select', 'multiselect', 'file', 'radio', 'checkbox', 'editor', 'date', 'custom', 'switch']) @php ($labelWidth = (isset($value['label_width']) ? $value['label_width'] : 'col-lg-3 col-md-3 col-sm-6 col-xs-12 text-right')) @php ($fieldWidth = (isset($value['field_width']) ? $value['field_width'] : 'col-lg-6 col-md-6 col-xs-12 col-sm-12')) @php ($value['value'] = isset($value['value']) ? $value['value'] : null) @if($coverClass)
@endif @if(isset($value['label']) && $value['label'])
@if(isset($value['help']))

{{ $value['help'] }}

@endif
@endif
@if($value['type'] == 'text') {!! Form::text($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'label') @php ($attributes['readonly'] = 'true') @php ($attributes['disabled'] = 'true') {!! Form::text($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'email') @php ($attributes['class'] .= ' disable-autocomplete') {!! Form::email($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'number') {!! Form::number($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'date') @php($attributes['class'] .= ' datepicker') {!! Form::text($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'time') @php($attributes['class'] .= ' timepicker') {!! Form::text($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'datetime') @php($attributes['class'] .= ' datetimepicker') {!! Form::text($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'password') @php ($attributes['class'] .= ' disable-autocomplete shhd') {!! Form::password($key, $attributes) !!} @elseif($value['type'] == 'textarea') {!! Form::textarea($key, $inputValue, $attributes) !!} @elseif($value['type'] == 'editor') @php ($attributes['class'] .= ' editor') {!! Form::textarea($key, $inputValue, $attributes) !!} @once @push('page_script') @endpush @endonce @elseif($value['type'] == 'select') @php($attributes['data-live-search'] = "true") @php($attributes['data-size'] = 5) @php($attributes['class'] .= ' live-search') @if(is_array($value['options']) && !empty($value['options'])) @php($value['options'] = ['' => 'Select Option'] + $value['options']) @endif {!! Form::select($key, $value['options'], $value['value'], $attributes) !!} @elseif($value['type'] == 'multiselect') @php ($attributes['multiple'] = 'true') {!! Form::select($key, $value['options'], $value['value'], $attributes) !!} @elseif($value['type'] == 'radio')
@foreach($value['options'] as $k => $option)
{{ Form::radio($key, $k, ($value['value'] == $k ? true : false), [ 'class' => $key .' custom-control-input', 'id' => $key . '-' . $k ]) }}
@endforeach
@elseif($value['type'] == 'checkbox')
@foreach($value['options'] as $k => $option)
{{ Form::checkbox($key .'[]', $k, ((is_array($value['value']) && in_array($k, $value['value'])) ? true : false), [ 'class' => $key .' custom-control-input', 'id' => $key . '-' . $k ]) }}
@endforeach
@elseif($value['type'] == 'switch') @foreach($value['options'] as $k => $option)
@endforeach @elseif($value['type'] == 'color')
{!! Form::text($key, $inputValue, $attributes) !!}
@once @push('page_css') @endpush @push('page_script') @endpush @endonce @elseif($value['type'] == 'dropzone')
@once @push('page_css') @endpush @push('page_script') @endpush @endonce @elseif($value['type'] == 'file') @php($fileInputName = $key) @if (array_key_exists('cropper', $attributes) && $attributes['cropper']) @php($cropRatio = isset($attributes['ratio']) && $attributes['ratio'] ? $attributes['ratio'] : '400x300') @php($attributes['onclick'] = "readImage(this, '" . $cropRatio . "')") @php($fileInputName .= '_input') @endif @if (!isset($attributes['id'])) @php($attributes['id'] = $key) @endif @php($attributes['class'] .= ' custom-file-input') @if (isset($attributes['multiple']) && $attributes['multiple']) @once @push('page_script') @endpush @endonce @else @php($originalFileName = '') @if ($value['value'] && isset($value['value']['file_name_original'])) @php($originalFileName = $value['value']['file_name_original']) @endif @php($value['value'] = isset($value['value']['original']) ? $value['value'] : \App\Models\File::file($value['value'])) @if (array_key_exists('preview', $attributes) && $attributes['preview']) @php($attributes['onchange'] = 'readImage(this)') @endif @if (in_array($value['value']['file_mime'], \App\Models\File::$fileValidations['image']['file_mimes'])) {{--
--}} @elseif($value['value']['file_mime'])
{{ $originalFileName }} Download
@else {{-- --}} @endif
{!! Form::file($fileInputName, $attributes) !!}

{{ isset($attributes['placeholder']) ? $attributes['placeholder'] : 'Upload ' . $value['label'] }}

@if (isset($value['help'])) {!! $value['help'] !!} @endif
@endif @elseif($value['type'] == 'custom') {!! $value['value'] !!} @elseif($value['type'] == 'mobile') @php ($attributes['data-inputmask'] = "'mask': '(999) 999-9999'") @php ($attributes['class'] .= " input-mask disable-autocomplete") {!! Form::text($key, $inputValue, $attributes) !!} @once @push('page_script') @endpush @endonce @elseif($value['type'] == 'address')
{!! Form::text($key, $inputValue, $attributes) !!} {{-- --}}

{{--
--}} @once @push('page_script') @endpush @endonce @endif
@if ($errors->has($key)) @endif
@if($coverClass)
@endif