@stack('headerScripts')

Volvo Survey Form

@csrf
Dear Customer

Thank you for being a valuable customer!. You are chosen for this survey to help us improve our products & services. Please take 5 to 10 minutes of your valuable time to fill this survey. Feel free to add your comments with your answers. At the end of the survey, help us understand your overall experience by filling the final comment textbox section.

@foreach($questions as $key => $question) @php $question_no = $key+1; @endphp
@if(in_array($question->id, array_column($response, 'question_id'))) @php $index = array_search($question->id, array_column($response, 'question_id')); $cardColor = 'bg-primary-light'; if($response[$index]['option_colour'] == 'green'){ $cardColor = 'bg-success'; } elseif ($response[$index]['option_colour'] == 'red'){ $cardColor = 'bg-danger'; } elseif ($response[$index]['option_colour'] == 'yellow'){ $cardColor = 'bg-warning'; } elseif ($response[$index]['option_colour'] == 'black'){ $cardColor = 'bg-dark'; } else{ $cardColor = 'bg-primary-light'; } @endphp @else @php $cardColor = 'bg-primary-light'; @endphp @endif
Q.{{$question_no}} @php $q = $question->question; @endphp @if(stripos($question->question, 'How likely is it that you will recommend') !== false) @if($campaign->aftermarket_touch_point == 1) @php $q = str_replace('< dealer name of dealership >', 'dealer '.$customer->workshop_name, $question->question); @endphp @elseif($campaign->aftermarket_touch_point == 2) @php $q = str_replace('< dealer name of dealership >', 'Volvos Site support', $question->question); @endphp @elseif($campaign->aftermarket_touch_point == 3) @php $q = str_replace('< dealer name of dealership >', 'Volvos services', $question->question); @endphp @endif @elseif(stripos($question->question, 'How likely is that you will prefer') !== false) @if($campaign->aftermarket_touch_point == 1) @php $q = str_replace('< visit Name of dealership >', 'visit '.$customer->workshop_name, $question->question); @endphp @elseif($campaign->aftermarket_touch_point == 2) @php $q = str_replace('< visit Name of dealership >', 'avail site support from Volvo', $question->question); @endphp @elseif($campaign->aftermarket_touch_point == 3) @php $q = str_replace('< visit Name of dealership >', 'avail services from Volvo', $question->question); @endphp @endif @endif {{$q}}
{{$question->commitment}}
{{$question->help_text}}
@if($question->help_text == 1)
@endif
@if($question->question_type == 'radio') @foreach(explode(',', $question->options) as $key => $option) @php $checked = ''; $option_id = explode(',', $question->option_ids)[$key]; @endphp @if(in_array($question->id, array_column($response, 'question_id'))) @php $index = array_search($question->id, array_column($response, 'question_id')); @endphp @if($response[$index]['response'] == $option_id) @php $checked = 'checked'; @endphp @endif @endif
@endforeach @endif @if($question->question_type == 'checkbox') @foreach(explode(',', $question->options) as $key => $option) @php $checked = ''; $option_id = explode(',', $question->option_ids)[$key]; @endphp @if(in_array($question->id, array_column($response, 'question_id'))) @php $index = array_search($question->id, array_column($response, 'question_id')); @endphp @if(in_array($option_id, explode(',', $response[$index]['response']))) @php $checked = 'checked'; @endphp @endif @endif
@endforeach @endif @if($question->question_type == 'select')
@endif
@if($question->additional_textbox == 1)
@php $remark = $textColour = $isRequired = ''; @endphp @if($question->textbox_mandatory == 1) @php $isRequired = 'required'; @endphp @endif @if(in_array($question->id, array_column($response, 'question_id'))) @php $index = array_search($question->id, array_column($response, 'question_id')); $remark = trim($response[$index]['response_remark']); @endphp @endif
@endif
@endforeach
Final Comments
@stack('footerScripts')