@extends('layouts.front') @section('content')
@php $percentage = ($currentInputsNum / $totalInputs) * 100; @endphp
{{ $currentInputsNum }}/{{ $totalInputs }}

{{ $projectForm->form->name }}

{{ $projectForm->form->desc }}

{{ $projectForm->created_at }}
Attached Files
@foreach ($projectForm->Form->formFiles as $file) @switch($file->type) @case('image/png') @break @case('image/jpg') @break @case('image/jpeg') @break @case('application/pdf') @break @default @endswitch @endforeach
@foreach ($formInputs as $key => $input) @switch($input->input_type) @case('text')
@break @case('number')
@break @case('textarea')
@break @case('file')
@if ($inputs->where('fixed_input_id',$input->id)->first() != null) @if ($inputs->where('fixed_input_id',$input->id)->first()->file_type == 'application/pdf') @else @if($inputs->where('fixed_input_id',$input->id)->first()->answer != null) @endif @endif @endif
@break @case('checkbox')
@if($input->inputsElemnts != null) @foreach($input->inputsElemnts as $el)
where('fixed_input_id',$input->id)->first() !=null && $inputs->where('fixed_input_id',$input->id)->first()->answer !=null) {{in_array($el->id,json_decode($inputs->where('fixed_input_id',$input->id)->first()->answer,true)) ?'checked':''}} @endif />
@endforeach @endif
@break @case('radio')
@if($input->inputsElemnts != null) @foreach($input->inputsElemnts as $el)
where('fixed_input_id',$input->id)->first() !=null) {{$el->id == $inputs->where('fixed_input_id',$input->id)->first()->answer ?'checked':''}} @endif />
@endforeach @endif
@break @default @endswitch @endforeach
@if ($prevPage != 0) @endif @if ($nextPage != $totalPages + 1) @else @endif
@endsection @section('script') @endsection