@foreach ($kyc->fields ?? [] as $key => $item)
@include('admin.components.form.input',[
'label' => __("Field Name*"),
'name' => "label[]",
'attribute' => "required",
'value' => old('label[]',$item->label),
])
@php
$selectOptions = ['text' => "Input Text", 'file' => "File", 'textarea' => "Textarea",'select' => "Select"];
@endphp
@include('admin.components.form.switcher',[
'label' => __("Field Necessity*"),
'name' => "field_necessity[]",
'options' => ['Required' => "1",'Optional' => "0"],
'value' => old("field_necessity[]",$item->required),
])
@endforeach
{{-- Default Field Row --}}
@if (count($kyc->fields ?? []) == 0)
@include('admin.components.form.input',[
'label' => __("Field Name*"),
'name' => "label[]",
'attribute' => "required",
'value' => old('label[]'),
])
@php
$selectOptions = ['text' => "Input Text", 'file' => "File", 'textarea' => "Textarea",'select' => "Select"];
@endphp
@include('admin.components.form.switcher',[
'label' => __("Field Necessity*"),
'name' => "field_necessity[]",
'options' => ['Required' => "1",'Optional' => "0"],
'value' => old("field_necessity[]","1"),
])
@endif
@include('admin.components.button.form-btn',[
'class' => "w-100 btn-loading",
'text' => __("Save & Change"),
'permission' => "admin.setup.kyc.update",
])