@php $type = $fieldType($fieldKey); $options = $fieldOptions($fieldKey); @endphp @if ($type === 'radio' && count($options)) @php($radioColumns = in_array($fieldKey, ['sex', 'marital_status'], true) ? 2 : count($options)) @foreach (array_chunk($options, $radioColumns, true) as $optionRow) @foreach ($optionRow as $value => $label) @endforeach @for ($i = count($optionRow); $i < $radioColumns; $i++) @endfor @endforeach
{{ $label }}
 
@elseif ($type === 'checkbox' && count($options)) @foreach (array_chunk($options, 3, true) as $optionRow) @foreach ($optionRow as $value => $label) @endforeach @for ($i = count($optionRow); $i < 3; $i++) @endfor @endforeach
@if ($isSelected($fieldKey, $value)) ✔ @endif {{ $label }}
 
@else {{ $v($fieldKey) }} @endif