+
+ @switch($question->type)
+ @case('hidden')
+
+ @break
+ @case('text')
+
required == 'yes' ? 'required' : ''}}
+ value="{{isset($question->value) ? $question->value : ''}}"
+ @if($form_id == '1793766025-480d8dde-07b3-497d-b55c-4f34a08ad5d1')
+ @if(in_array($question->code, ['msl_code', 'pcode', 'speciality']))
+ readonly
+ @endif
+ @if(in_array($question->question, ['Hospital/Clinic Name', 'City', 'Current NEB 1 Brand Prescribers']))
+ oninput="this.value = this.value.replace(/[^a-zA-Z .'-]/g, '')"
+ @endif
+ @endif
+ >
+ @break
+
+ @case('email')
+
required == 'yes' ? 'required' : ''}}
+ value="{{isset($question->value) ? $question->value : ''}}">
+ @break
+
+ @case('tel')
+
required == 'yes' ? 'required' : ''}}
+ value="{{isset($question->value) ? $question->value : ''}}">
+ @break
+
+ @case('date')
+
required == 'yes' ? 'required' : ''}}
+ value="{{isset($question->value) ? $question->value : ''}}"
+ @if($form_id == '1793766025-480d8dde-07b3-497d-b55c-4f34a08ad5d1' && $question->code == 'record_date')
+ min="2026-11-01"
+ max="{{date('Y-m-d')}}"
+ @endif>
+ @break
+ @case('number')
+
required == 'yes' ? 'required' : ''}}
+ value="{{isset($question->value) ? $question->value : ''}}"
+ @if($form_id == '1793766025-480d8dde-07b3-497d-b55c-4f34a08ad5d1')
+ oninput="this.value = this.value.replace(/[^0-9]/g, '')"
+ @endif
+ >
+ @break
+ @case('textarea')
+
+ @break
+ @case('dropdown')
+
+ @break
+ @case('radio')
+ @foreach($question->options as $option)
+
+
+
+
+ @endforeach
+ @break
+ @case('radiometrix')
+ @php
+ // Decode the first option's value to use as heading labels
+ $headings =
+ count($question->options) > 0
+ ? json_decode($question->options[0]->value)
+ : [];
+ @endphp
+
+ {{-- Matrix Wrapper with Horizontal Scroll on Small Screens --}}
+
+
+ {{-- Table Headers --}}
+
+
+ {{-- Placeholder for row labels --}}
+ @foreach ($headings as $head)
+
{{ $head }}
+
+ @endforeach
+
+
+ {{-- Table Rows --}}
+ @foreach ($question->options as $option)
+ @php $nn = json_decode($option->value); @endphp
+
+
+ {{ $option->display }}
+
+
+ @foreach ($nn as $value)
+
+ display) && $option->display != $option->display ? 'checked' : '' }}>
+
+
+ @endforeach
+
+ @endforeach
+
+
+ @break
+ @case('checkbox')
+ @foreach($question->options as $option)
+
+ value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}>
+
+
+ @endforeach
+ @break
+ @case('file')
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
required == 'yes'?'required':'' }}>
+ @elseif(isset($question->value))
+

+ @endif
+
+ @break
+ @case('multitextbox')
+
+ @foreach($question->options as $option)
+
{{$option->display}}
+
+
+
+ @endforeach
+
+ @break
+ @endswitch
+
+ @endforeach
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+