@foreach($formData as $data)
@if($data->type == 'file') @foreach($userData as $file) @if($data->name == $file->name && $file->type == 'file' && $file->value) @lang('Download attachment') @endif @endforeach @endif
@if($data->type == 'text') is_required == 'required') required @endif @foreach($userData as $text) @if($data->name == $text->name && $text->type == 'text') value="{{ old($data->label) ?? $text->value }}" @endif @endforeach > @elseif($data->type == 'textarea') @php $textareaVal = null; foreach($userData as $textarea){ if($data->name == $textarea->name && $textarea->type == 'textarea'){ $textareaVal = old($data->label) ?? $textarea->value; } } @endphp @elseif($data->type == 'select') @elseif($data->type == 'checkbox') @foreach($data->options as $option)
value) == 'array') @foreach($checkbox->value as $checkboxVal) @if($option == $checkboxVal && $checkbox->type == 'checkbox') @checked(true) @endif @endforeach @endif @endforeach >
@endforeach @elseif($data->type == 'radio') @foreach($data->options as $option)
value && $radio->type == 'radio') @checked(true) @endif @endforeach >
@endforeach @elseif($data->type == 'file') type == 'file') @foreach($userData as $file) @if($data->name == $file->name && $file->type == 'file' && !$file->value && $data->is_required == 'required') required @endif @endforeach @endif accept="@foreach(explode(',',$data->extensions) as $ext) .{{ $ext }}, @endforeach" >
@lang('Supported mimes'): {{ $data->extensions }}
@endif
@endforeach