@extends('layouts.horizontal', ['title' => 'Consent Form', 'topbarTitle' => 'Consent Form']) @section('css') @vite(['node_modules/select2/dist/css/select2.min.css']) @endsection @section('content')
{{-- Logo --}}
{{-- Title --}}

CONSENT FORM ({{ strtoupper($form_data->form_title) }})

{{-- Customer Details --}}
Client Name:

{{ $form_data->customer_name }}

Date of Visit:

{{ $form_data->visit_date ?: '-' }}

Client Cell:

{{ $form_data->customer_cell }}

Area of Residence:

{{ $form_data->customer_area ?: '-' }}

Tech Consultant:

{{ $form_data->consultant_name ?: '-' }}

Event Date:

{{ $form_data->event_date ?: '-' }}

{{-- Dynamic Form Structure --}}
@php $sections = json_decode($form_data->concent_data, true); @endphp @foreach($sections as $section => $sectionHeading)
@if(!str_contains($section, '-'))

{{ $section }}

@endif @foreach($sectionHeading as $sub => $elements)
{{ $sub }}
@if($sub !== $section && strpos($sub, '-') === 0)
{{ $sub }}
@endif
@foreach($elements as $key => $value) @php [$label, $type] = explode('||', $key); @endphp @if(in_array($type, ['checkbox','radio']))
@elseif($type === 'para')

{!! urldecode($value) !!}

@elseif($type === 'list')
{!! urldecode($value) !!}
@elseif($type === 'img') @elseif($type === 'imghalf')

{!! urldecode($value) !!}

@endif @endforeach
@endforeach
@endforeach
{{-- Signatures --}}
Client Signature:
Consultant Signature:
@endsection @section('scripts') @vite(['node_modules/jsignature/libs/jSignature.min.js', 'node_modules/select2/dist/js/select2.min.js']) @endsection