@php $currentPath = request()->path(); // Fetch active forms for the current page $activeWidgetForms = \App\Models\WidgetForm::where('is_active', true) ->where(function($query) use ($currentPath) { $query->where('page_location', '*') ->orWhere('page_location', $currentPath) ->orWhere('page_location', '/' . $currentPath); }) ->orderBy('id', 'asc') ->get(); @endphp @foreach($activeWidgetForms as $index => $form)

{{ $form->title }}

@csrf
@if($form->show_wa)
@endif @if($form->show_city)
@endif @if($form->show_state)
@endif @if($form->show_level_of_study)
@endif @if($form->show_preferred_destination)
@endif @if($form->show_preferred_course)
@endif @if($form->show_education_qualification)
@endif @if($form->show_ssc_marks)
@endif @if($form->show_hsc_marks)
@endif @if($form->show_funding_source)
@endif @if($form->custom_fields && is_array($form->custom_fields)) @foreach($form->custom_fields as $cf)
@if($cf['type'] == 'select') @elseif($cf['type'] == 'select_custom') @elseif($cf['type'] == 'textarea') @else @endif
@endforeach @endif
@endforeach