@foreach($formFields as $field)
@php
$item = $submissionItems->where('form_field_id', $field->id)->first();
$value = null;
if (!empty($item)) {
$value = $item->value;
}
@endphp
@if($field->type == "input")
@elseif($field->type == "number")
@elseif($field->type == "textarea")
@elseif($field->type == "upload")
@elseif($field->type == "date_picker")
@elseif($field->type == "toggle")
@error($field->id)
{{ $message }}
@enderror
@elseif($field->type == "dropdown")
@if(!empty($field->options) and count($field->options))
@endif
@elseif($field->type == "checkbox")
@php
if (!empty($value)) {
$value = json_decode($value, true);
}
@endphp
@if(!empty($field->options) and count($field->options))
@endif
@elseif($field->type == "radio")
@if(!empty($field->options) and count($field->options))
@endif
@endif
@endforeach