@php
$cmFieldStyle = (is_array(data_get($field, 'options')) && count(data_get($field, 'options')) > 12)
? ' style="height: 250px; overflow-y: scroll;"'
: '';
@endphp
@foreach (data_get($field, 'options') as $option)
@php
$optionId = data_get($option, 'id');
// Get the default value
$defaultValue = (request()->filled($fieldOld . '.' . $optionId))
? request()->input($fieldOld . '.' . $optionId)
: (
(
is_array(data_get($field, 'default_value'))
&& !empty($optionId)
&& !empty(data_get($field, 'default_value.' . $optionId . '.value'))
)
? data_get($field, 'default_value.' . $optionId . '.value')
: data_get($field, 'default_value')
);
// Field Query String
$fieldQueryStringId = 'cf' . data_get($field, 'id') . $optionId . 'QueryString';
$fieldQueryStringValue = \App\Helpers\Arr::query(request()->except(['page', $fieldId . '.' . $optionId]));
$fieldQueryString = '
';
@endphp
{!! $fieldQueryString !!}
@endforeach