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

CONSENT FORM ({{ strtoupper($consent_form->concent_form) }})

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

{{ $customerdetails->customer_name }}

Date of Visit:

{{ $customerdetails->customer_visit_date ?: '-' }}

Client Cell:

{{ $customerdetails->customer_cell }}

Area of Residence:

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

Tech Consultant:
Event Date:
{{-- Dynamic Form Structure --}}
@php $structure = json_decode($consent_form->form_structure, true); @endphp
@php $x = 0; @endphp @foreach($structure as $section => $sectionheading)
@if(str_contains($section, '-')) @else

{!! $section !!}:

@endif @foreach($sectionheading as $heading => $elements)
@if(str_contains($heading, '-')) @else
{!! $heading !!}
@endif @foreach($elements as $key => $type) {{-- Checkbox --}} @if($type === 'checkbox' && strpos($key,'-') === false)
@php $x++; @endphp @endif {{-- Radio --}} @if($type === 'radio' && strpos($key,'-') === false)
@php $x++; @endphp @endif {{-- Paragraph --}} @if($type === 'para' && strpos($key,'-') === false)

{!! $key !!}

@endif {{-- List --}} @if($type === 'list')
{!! $key !!}
@endif {{-- Textarea --}} @if($type === 'textarea')

@if(strpos($key, '-') === false) @endif

@php $x++; @endphp @endif {{-- Image --}} @if($type === 'img') @endif {{-- Image with Text --}} @if($type === 'imghalf')
@if(strpos($key,"-")===0) @endif
@endif @endforeach
@endforeach
@endforeach
{{-- Signatures --}}
@endsection @section('scripts') @vite(['node_modules/jsignature/libs/jSignature.min.js', 'node_modules/select2/dist/js/select2.min.js']) @endsection