@php $data_for_chart = []; $fields = $form->fields; $template_alias_no_options = get_form_templates()->where('attribute_type', 'string')->pluck('alias')->all(); @endphp
@foreach ($fields as $field) @php $responses = $field->responses; $responses_count = $responses->where('answer', '!==', null)->count(); @endphp

{{ $responses_count }} {{ str_plural('response', $responses_count) }}

@if (in_array($field->template, $template_alias_no_options))
@foreach ($responses as $response) @if ($loop->index === 10) Check the individual responses for more information @break @endif @php $answer = $response->getAnswerForTemplate($field->template); @endphp @endforeach
{!! $answer !!}
@else @php $response_for_chart = $field->getResponseSummaryDataForChart(); @endphp @if (!empty($response_for_chart)) @php $data_for_chart[] = $response_for_chart; @endphp
@endif @endif
@if (!$loop->last)
@endif @endforeach
@push('script') @endpush