@include('layouts.shared/title-meta', ['title' => "Form"]) @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
processing...

{{$title}}

{{$session->number}}
@foreach($session->dates->date as $i => $date)
{{date("d M, Y", strtotime($date) )}} {{date("h:iA", strtotime($session->dates->start[$i]) )}}-{{date("h:iA", strtotime($session->dates->end[$i]) )}}
@endforeach
@if(Session::has('error'))
{{Session::get('error')}}

@endif @if(session('success'))
{{ session('success') }}

@endif

{{$form->title}}

@csrf @if($form_id == '1752828215-ed1f07b7-6355-4ce0-88d6-8fb48cea62d1')
@endif
@foreach($questions as $i => $question)
@if($question->type != 'label') @endif @switch($question->type) @case('label')
{{$question->question}}
@break @case('hidden') @break @case('text') @case('email') @case('tel') @case('date') required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:''}}"> @break @case('number') required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}"> @break @case('textarea') @break @case('dropdown') @php $otherOption = null; $otherDisplays = ['other', 'others', 'other (please specify)', 'other (please specify)']; foreach($question->options as $option) { if(in_array(strtolower(trim($option->display)), $otherDisplays)) { $otherOption = $option; break; } } $otherValue = ''; if(isset($question->value) && isset($otherOption) && $question->value == $otherOption->value && isset($question->other)) { $otherValue = $question->other; } @endphp @if($otherOption)
@endif @break @case('checkbox') @foreach($question->options as $option)
value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}>
@if(strtolower(trim($option->display)) == 'others' || strtolower(trim($option->display)) == 'other') @php $othersValue = ''; if(isset($question->value) && is_array($question->value)) { foreach($question->value as $val) { // If value is not in options, treat as "Others" value $isOption = false; foreach($question->options as $opt) { if($opt->value == $val) { $isOption = true; break; } } if(!$isOption) { $othersValue = $val; break; } } } @endphp
@endif @endforeach @break @case('radio')
@foreach($question->options as $i => $option)
required == 'yes' && $i == 0 )?'required':'' }}>
@endforeach
@break @case('file') @break @case('multitextbox')
@foreach($question->options as $option)
{{$option->display}}
@endforeach
@break @case('radiometrix') @php // Get all x-axis values from the first option $x_values = []; if(count($question->options) > 0) { $first_option = $question->options[0]; $x_values = json_decode($first_option->value, true) ?? []; } @endphp
@foreach($x_values as $x) @endforeach @foreach ($question->options as $option) @php $row_values = json_decode($option->value, true) ?? []; @endphp @foreach($x_values as $x) @endforeach @endforeach
{{ $x }}
{{ $option->display }} @if(in_array($x, $row_values)) value) && isset($question->value[$option->display]) && $question->value[$option->display] == $x) ? 'checked' : '' }}> @endif
@break @endswitch
@endforeach
@if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
@endif
@include('layouts.shared/footer-script')