@php $cf_id = $custom_field->id ?? optional($custom_field->pivot)->custom_field_id ?? $custom_field->custom_field_id ?? null; $contact_data = $contact_data ?? []; $get_html = $get_html ?? false; @endphp @if($cf_id)
@if($custom_field->type == 'number') is_required ? 'required' : '' }}> @elseif($custom_field->type == 'textarea') " : "</textarea>" !!} @elseif($custom_field->type == 'date')
is_required ? 'required' : '' }}>
@elseif($custom_field->type == 'radio') @foreach (\App\Http\Helper\Helper::splitLineBreakWithComma($custom_field->values) as $value)
@endforeach @elseif($custom_field->type == 'checkbox') @php $contact_data_chks = !empty($contact_data[$cf_id]) ? preg_split("/(,|[||])/", $contact_data[$cf_id]) : []; $contact_data_chks = array_map('trim', $contact_data_chks); @endphp @foreach (\App\Http\Helper\Helper::splitLineBreakWithComma($custom_field->values) as $value)
@endforeach @elseif($custom_field->type == 'dropdown') @else is_required ? 'required' : '' }}> @endif
@endif