@php function convertStringToArray($string) { $result = []; $parts = explode(',', $string); foreach ($parts as $part) { $values = explode('##', $part); if (count($values) === 2) { $result[] = [ "value" => $values[0], "label" => ucfirst($values[1]) ]; } } return $result; } @endphp
@csrf @if(isset($course)) @endif @if(isset($page)) @endif @if(is_array($formList) || is_object($formList)) @php $name = ''; $divEnding = false; @endphp @foreach($formList as $key=>$forms) @php $currentName = $forms->name; // Check if the next element exists if(isset($formList[$key + 1])) { $nextName = $formList[$key + 1]->name; } else { $nextName = null; // Handle the case where there is no next element } if($currentName != $nextName){ $divEnding = true; }else{ $divEnding = false; } // Your logic here using $currentName and $nextName @endphp {{-- getting a new form group --}} @if($name != $forms->name) @php $name = $forms->name; $className = 'row formGroupBox'; if($forms->repeat == 'Y'){ $className .=' repeatIt'.$forms->group_id; // this form group has repeat option } @endphp
{{$forms->name}}
@endif @if($forms->ftype == 'FR')

@php $fRadios = convertStringToArray($forms->foption_value); @endphp @foreach($fRadios as $key=>$fRadio) @endforeach
@elseif($forms->ftype == 'FK')
frequired == '1') required @endif autocomplete="off" />
@elseif($forms->ftype == 'FS')
@elseif($forms->ftype == 'TA')
@php $fromInputValue=''; if($pageViewType=="readView") $fromInputValue = $allFormData->{$forms->fname}; @endphp
@else
@php $fromInputValue=''; if($pageViewType=="readView") $fromInputValue = $allFormData->{$forms->fname}; @endphp frequired == '1') required @endif autocomplete="off" />
@if($forms->flabel=="Class / CGPA (বিভাগ/সিজিপিএ)")
@endif @endif @if($divEnding)
@if($forms->repeat == 'Y') @endif @endif @endforeach {{-- @if(isset($course))



@endif --}} {{--Signature Preview--}}
@endif