@switch($contenttype)
@case('free_form_text')
@if(isset($href))
@else
@endif
@break
@case('date')
@break
@case('date_time')
@break
@case('check_box')
@break
@case('multiple_select')
@php
$multilistoptions = is_string($listoptions) ? json_decode($listoptions, true) : $listoptions;
if (is_string($multilistoptions) && json_last_error() !== JSON_ERROR_NONE) {
$multilistoptions = explode(',', $multilistoptions);
}
$valueArray = explode(',', $value);
$matchingOptions = array_filter($multilistoptions, function($option) use ($valueArray) {
return in_array($option['id'], $valueArray);
});
@endphp
@foreach ($matchingOptions as $index => $option)
{{ $option['value'] }}@if($index < count($matchingOptions) - 1), @endif
@endforeach
--
@break
@case('list')
--
@break
@endswitch
@if($contenttype == 'free_form_text')
@endif