@php $contact = $config['form']['navbar']['contact']['input']; @endphp
@foreach ($contact as $k_c => $c) @if (empty($c['status']) && !is_array($c)) @continue @endif {{-- New repeater pattern (multiple) --}} @if (!empty($c['multiple'])) @php $label = __("field.{$k_c}"); $values = $data->{$k_c} ?? []; if (is_string($values)) $values = json_decode($values, true) ?? [$values]; if (empty($values)) $values = ['']; @endphp
@foreach ($values as $idx => $val)
@if ($c['type'] == 'mail') @elseif ($c['type'] == 'tel') @else @endif
@endforeach
{{-- Legacy row_ pattern --}} @elseif (str_contains($k_c, 'row_')) @if (empty($c['status'])) @continue @endif
@foreach ($c as $k_i => $i) @if (empty($i['status'])) @continue @endif
@php $chk_req = !empty($i['validate']); $label = __("field.{$k_i}"); @endphp @if (in_array($i['type'], ['mail', 'tel'])) @endif
@endforeach
{{-- Standard single field --}} @else @if (empty($c['status'])) @continue @endif
@php $chk_req = !empty($c['validate']); $label = __("field.{$k_c}"); @endphp @if (in_array($c['type'], ['text', 'mail', 'tel', 'input'])) @endif
@endif @endforeach