@if(!empty($field['appendixCategories'])) @php $row_key = 0; $step = 0; $appendixPCategories = App\Models\AppendixParentCategory::where('appendix_id', $appendix_id)->get(); @endphp @if(!empty($appendixPCategories) && count($appendixPCategories) > 0) @livewire('appendix-form', ['competitionId' => $competition_id, 'appendixId' => $appendix_id, 'competitionYearId' => $competition_year_id]) @else @foreach ($field['appendixCategories'] as $repeatable_row_key => $appendixCategory)
hasUploadFields('create')) enctype="multipart/form-data" @endif > {!! csrf_field() !!} {{-- load the view from the application if it exists, otherwise load the one in the package --}}

{{$appendixCategory?->appendixForm?->title}}

{{$appendixCategory->title}}

@if ($hidden ?? false)
@endif
@php $appendixForms = $appendixCategory?->appendixForm?->appendixFormTfs; @endphp @if (!empty($appendixForms) && count($appendixForms)) @foreach($appendixForms as $key => $appendixForm) @php $field = [ 'type' => 'text', 'name' => 'appendixDataDetails['.$key.'][data]', 'label' => $appendixForm->title, 'wrapper' => [ 'class' => 'row col-md-11 offset-md-1 mt-2', ], ]; @endphp @if($appendixForm->type->label() == "Text") @php $field['type'] = 'inline_text'; $fieldView = $crud->getFirstFieldView("inline_text", false); @endphp @include($fieldView, ['field' => $field]) @php $field['type'] = 'hidden'; $field['value'] = $appendixForm->id; $field['name'] = 'appendixDataDetails['.$key.'][appendix_form_tf_id]'; $fieldView = $crud->getFirstFieldView("hidden", false); @endphp @include($fieldView, ['field' => $field]) @elseif($appendixForm->type->label() == "Datetime") @php $field['type'] = 'inline_date'; $fieldView = $crud->getFirstFieldView("inline_date", false); @endphp @include($fieldView, ['field' => $field]) @php $field['type'] = 'hidden'; $field['value'] = $appendixForm->id; $field['name'] = 'appendixDataDetails['.$key.'][appendix_form_tf_id]'; $fieldView = $crud->getFirstFieldView("hidden", false); @endphp @include($fieldView, ['field' => $field]) @elseif($appendixForm->type->label() == "Number") @php $field['type'] = 'inline_number'; $fieldView = $crud->getFirstFieldView("inline_number", false); @endphp @include($fieldView, ['field' => $field]) @php $field['type'] = 'hidden'; $field['value'] = $appendixForm->id; $field['name'] = 'appendixDataDetails['.$key.'][appendix_form_tf_id]'; $fieldView = $crud->getFirstFieldView("hidden", false); @endphp @include($fieldView, ['field' => $field]) @elseif($appendixForm->type->label() == "Textarea") @php $field['type'] = 'textarea'; $fieldView = $crud->getFirstFieldView("textarea", $field['view_namespace'] ?? false); @endphp @include($fieldView, ['field' => $field]) @php $field['type'] = 'hidden'; $field['value'] = $appendixForm->id; $field['name'] = 'appendixDataDetails['.$key.'][appendix_form_tf_id]'; $fieldView = $crud->getFirstFieldView("hidden", false); @endphp @include($fieldView, ['field' => $field]) @elseif($appendixForm->type->label() == "Checkbox") @php $field['type'] = 'checkbox'; $fieldView = $crud->getFirstFieldView("checkbox", $field['view_namespace'] ?? false); @endphp @include($fieldView, ['field' => $field]) @php $field['type'] = 'hidden'; $field['value'] = $appendixForm->id; $field['name'] = 'appendixDataDetails['.$key.'][appendix_form_tf_id]'; $fieldView = $crud->getFirstFieldView("hidden", false); @endphp @include($fieldView, ['field' => $field]) @endif @endforeach @endif
@if ($hidden ?? false)
@endif {{-- This makes sure that all field assets are loaded. --}}
{{ json_encode(Basset::loaded()) }}
@include('crud::inc.form_save_buttons')
@endforeach @endif @php // the $row variable still exists. We don't need it anymore the loop is over, and would have impact in the following code. unset($row); @endphp @endif