@extends('admin.layouts.app') @push('libraries_top') @endpush @section('content')

{{ $pageTitle }}

id}/submissions/{$submission->id}/update") }}" method="post" class="mt-30"> {{ csrf_field() }} @foreach($form->fields as $field) @php $item = $submission->items->where('form_field_id', $field->id)->first(); $value = null; if (!empty($item)) { $value = $item->value; } @endphp @if($field->type == "input")
@error($field->id)
{{ $message }}
@enderror
@elseif($field->type == "number")
@error($field->id)
{{ $message }}
@enderror
@elseif($field->type == "textarea")
@error($field->id)
{{ $message }}
@enderror
@elseif($field->type == "upload")
@error($field->id)
{{ $message }}
@enderror
@elseif($field->type == "date_picker")
@error($field->id)
{{ $message }}
@enderror
@elseif($field->type == "toggle")
@error($field->id)
{{ $message }}
@enderror
@elseif($field->type == "dropdown") @if(!empty($field->options) and count($field->options))
@error($field->id)
{{ $message }}
@enderror
@endif @elseif($field->type == "checkbox") @php if (!empty($value)) { $value = json_decode($value, true); } @endphp @if(!empty($field->options) and count($field->options))
@foreach($field->options as $option)
id, $value)) ? 'checked' : '' }} >
@endforeach @error($field->id)
{{ $message }}
@enderror
@endif @elseif($field->type == "radio") @if(!empty($field->options) and count($field->options))
@foreach($field->options as $option)
id) ? 'checked' : '' }} >
@endforeach @error($field->id)
{{ $message }}
@enderror
@endif @endif @endforeach
@endsection @push('scripts_bottom') @endpush