@if (isset($field->label) && $field->type != 'checkbox') @endif @php $disabled = (isset($field->extra) && in_array('disabled', $field->extra)) ? 'disabled' : ''; $readonly = (isset($field->extra) && in_array('readonly', $field->extra)) ? 'readonly' : ''; $class = (isset($field->class)) ? $field->class : ''; $name = (isset($field->name)) ? $field->name : null; $name = ($name && isset($field->group)) ? $field->group.'['.$name.']' : $name; $multiple = (isset($field->extra) && in_array('multiple', $field->extra)) ? 'multiple' : ''; $divider = (isset($field->extra) && in_array('divider', $field->extra)) ? true : false; $titleAsId = (isset($field->extra) && in_array('title_as_id', $field->extra)) ? true : false; $multi = ($multiple) ? '[]' : ''; @endphp @if ($field->type == 'text' || $field->type == 'password' || $field->type == 'date' || $field->type == 'file') type == 'date') type="text" class="form-control date {{ $class }}" @else type="{{ $field->type }}" class="form-control {{ $class }}" @endif @if ($name) name="{{ $name }}" @endif @if (isset($field->placeholder)) placeholder="@lang ($field->placeholder)" @endif @if (isset($field->autocomplete)) autocomplete="{{ $field->autocomplete }}" @endif @if ($value && $field->type != 'password') value="{{ $value }}" @endif @if (isset($field->dataset)) @foreach ($field->dataset as $key => $val) data-{{ $key }}="{{ $val }}" @endforeach @endif {{ $disabled }} {{ $readonly }}> @elseif ($field->type == 'select') @elseif ($field->type == 'checkbox') @if (!isset($field->position) || $field->position == 'left') @endif disabled) && $field->disabled) disabled="disabled" @endif @if ($value) value="{{ $value }}" @endif @if ($field->checked) checked @endif @if (isset($field->dataset)) @foreach ($field->dataset as $key => $val) data-{{ $key }}="{{ $val }}" @endforeach @endif > @if (isset($field->position) && $field->position == 'right') @endif @elseif ($field->type == 'textarea') @elseif ($field->type == 'hidden') @endif @if ($field->type == 'date' && !$disabled) @endif @if ($name && isset($field->id) && !$disabled)
@endif @if ($divider)