@php
$form_builder_name = $form->name."'s Response";
@endphp
@include('crm.side-menu', ['hrm_header' => "$form_builder_name"])
@php
$first = null;
$second = null;
$third = null;
$i = 0;
@endphp
@forelse ($form->response as $response)
@php
$i++;
$resp = json_decode($response->response,true);
if(count($resp) == 1)
{
$resp[''] = '';
$resp[' '] = '';
}
elseif(count($resp) == 2)
{
$resp[''] = '';
}
$firstThreeElements = array_slice($resp, 0, 3);
$thead= array_keys($firstThreeElements);
$head1 = ($first != $thead[0]) ? $thead[0] : '';
$head2 = (!empty($thead[1]) && $second != $thead[1]) ? $thead[1] : '';
$head3 = (!empty($thead[2]) && $third != $thead[2]) ? $thead[2] : '';
@endphp
@if(!empty($head1) || !empty($head2) || !empty($head3) && $head3 != ' ')
| {{ $head1 }} |
{{ $head2 }} |
{{ $head3 }} |
# |
@endif
@php
$first = $thead[0];
$second = $thead[1];
$third = $thead[2];
@endphp
@foreach(array_values($firstThreeElements) as $ans)
| {{$ans}} |
@endforeach
|
@empty
@endforelse
@include('new_layouts.footer')