@extends('layouts.app') @section('title', 'Submit Form') @section('content')
@if($method=='POST')

Submit Form

@else

Edit Form

@endif Back
{{-- Alert Messages --}} @include('common.alert')
{{$form->form_name}}
@if(count($form->formSections)>0)
@csrf @if ($method === 'PUT') @method('PUT') @endif @foreach ($form->formSections as $sectionInfo)
@if (isset($sectionInfo->section->section_name) && $sectionInfo->section->section_name!="")

{{$sectionInfo->section->section_name}}

@endif @if (isset($sectionInfo->section->description) && $sectionInfo->section->description!="")

{{$sectionInfo->section->description}}

@endif
@if(count($sectionInfo->sectionFields)>0) @foreach($sectionInfo->sectionFields as $sectionField) @php $FieldTtype = $sectionField->field_type; $fieldRequired = ""; if($sectionField->field_required==1){ $fieldRequired = "required"; } @endphp
@switch($FieldTtype) @case('textarea') @break @case('date') @break @case('file') @if (isset($formJsonData[$sectionField->field_name]) && $formJsonData[$sectionField->field_name]!="") @php $fileExtension = pathinfo($formJsonData[$sectionField->field_name],PATHINFO_EXTENSION); //dd($fileExtension); @endphp @if(in_array($fileExtension,explode(',', env('DOCUMENT_EXTENSIONS')))) @else @endif @endif @break @case('multifile') @if (isset($formJsonData[$sectionField->field_name]) && $formJsonData[$sectionField->field_name]!="") @foreach ($formJsonData[$sectionField->field_name] as $keyFile=>$image) @php $fileExtension = pathinfo($image,PATHINFO_EXTENSION); @endphp
@if(in_array($fileExtension,explode(',', env('DOCUMENT_EXTENSIONS')))) @else @endif ×
@endforeach @endif @break @case('checkbox') field_name]) && $formJsonData[$sectionField->field_name]==1) checked @endif {{ $fieldRequired }}> @break @case('radio') field_name]) && $formJsonData[$sectionField->field_name]==1) checked @endif {{ $fieldRequired }}>Yes field_name]) && $formJsonData[$sectionField->field_name]==0) checked @endif {{ $fieldRequired }}>No @break @default @endswitch
@endforeach @endif
@endforeach
Cancel
@endif
@endsection @push('script') @endpush